How to Install an Older Version of a Package in Ubuntu/Debian

It’s not advisable to install an older version of a package on your computer, but what can we do when the latest build removes the feature that we want?

A similar kind of incident happened to me when I tried to use tasksel to install LAMP server on Ubuntu 22.04 (Jammy Jellyfish), which was available in the previous version of Ubuntu 22.04 but not in the latest version.

I was able to manually install Apache, MySQL, and PHP, but it’s much more convenient when you do it automatically with tasksel.

That’s a reason I downloaded the old release of tasksel from Launchpad and installed it on my system, which sent me a couple of errors, but I was aware of those errors, so it didn’t take much time to install the old release of tasksel.

If you are also looking to install some older versions of applications into your system, then this guide can be very helpful to avoid errors and spending time to fix them up.

Install Old Version of Packages in Debian/Ubuntu

For the sake of this guide, I’m going to use an older version of tasksel and the dependency programme tasksel-data, which I have found on Launchpad.

If you are also looking for an older version of any programme, then go to Launchpad, where you will find the binary file for the  application you need.

Install using the dpkg command

Yes, we will use the dpkg command to install an older version of the application because when you try to install a package from the apt command, it will throw an unmet dependency error (E: Unable to correct problems, you have / held broken packages.)

Even if you try to install an application using the dpkg command, you will get the dependency error, but you can use the --force-depends option to suppress the error and let dpkg install the application for you.

For example, if I want to install tasksel_3.34ubuntu16_all.deb on my Ubuntu 22.04, then let me run the following command with the path of the file:

$ sudo dpkg -i --force-depends ~/Downloads/tasksel_3.34ubuntu16_all.deb

The output of the above command

Installed application by suppressing dependency issue
Install the application by suppressing the dependency issue

In the output, you can clearly see that the dpkg command ignored the dependency and installed the application.

If I run the tasksel command, it won’t get launched because of the missing tasksel-data. I do have the  tasksel-data file, which I’ll install later, but for your reference, I have shown you that even if you successfully install applications, you may find unexpected behaviour from the applications.

So it’s better to get the latest application or manually fulfil all the required dependencies.

Install using apt command

As I have already downloaded the dependency file tasksel-data from LaunchPad, it is now time to install tasksel and tasksel-data.

In the above steps, I installed the taskel, but I removed it to show you this method from the start.

Once you open the terminal, change your current directory to where the file is located, and specify the programme and the dependency like shown below.

$ sudo apt install ./tasksel_3.34ubuntu16_all.deb ./tasksel-data_3.34ubuntu16_all.deb

The output of the above command is shown below:

Installed application by providing dependency
Installed application by providing dependency

If you provide dependencies, then you will not get the dependency error, but sometimes you will not be able to install the application because the chances are high that your system has the latest version of the dependencies, which will cause a conflict.

Therefore, I would recommend you use the dpkg command to forcefully install an application on your system

Wrap up

That’s all for this article, where you learned how to install older versions of applications in Ubuntu/Debian based distributions.

If you want, you can also ask apt command to provide you with the old version of the command. To know how to check this article: How to Install a Specific Version of a Package in Ubuntu Linux

If you know any other way to install old version of command, then let use know in the comment section.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments