It is a good practice to regularly update and upgrade software packages in Ubuntu to get benefit of latest updates, bug fixes, security patches and performance improvements. But sometimes you may find that after you update/upgrade a package on your system, it starts giving performance issues or stops working completely. This generally happens because an update/upgrade is not as stable as its previous version. One of the simplest ways to fix this problem is to downgrade software in Ubuntu. There are several ways to downgrade software in Ubuntu. In this article, we will learn how to downgrade software in Ubuntu.
How to Downgrade Software in Ubuntu
In this article, we will learn how to downgrade software in Ubuntu via command line tool apt-cache as well as using synaptic package manager.
Downgrade Software Via Apt-Cache
Ubuntu uses apt-get package manager to install, update, downgrade, remove, and modify packages. It uses a feature called apt-cache that stores the previous versions of your software whenever you update/upgrade it. For example, if you have upgraded Wine software from version 3.6 to 4.0 using apt-get then version 3.6 will still be present in apt-cache and can be used to rollback the update. Of course, it will not work if you have cleaned up this apt-cache using apt clean command.
You don’t need to install any new software to access apt-cache. Open terminal and run the following command to search Ubuntu’s package cache for program you want to downgrade.
$ apt-cache show name-of-program
Here is an example to view all entries for package Wine.
$ apt-cache show winehq-stable
Alternatively, you can also use apt cache policy or apt cache search to get the list of versions in apt-cache.
apt-cache policy packagename OR apt-cache search packagename
Go through the output to view all the past installed versions to find the one you want to downgrade to. Once you have found the required package’s version number, run the following command to downgrade your program to that version.
$ sudo apt install packagname=version
Here is the command to downgrade Wine package to version 3.6.
$ sudo apt install winehq-stable=3.6.0
Downgrade via Synaptic Package Manager
If you are not comfortable working in terminal, you can use Synaptic Package Manager that provides a graphical interface to manage your packages. But you will need to install it first with the following command.
$ sudo apt install synaptic
Once it is installed look it up in Application Menu and start it. You may be asked to enter password to proceed. Enter it.
Once Synaptic Package manager has opened, use its search box to look for the required package. Click on the program you want to downgrade, from the search results. Then click menu that says Package and click Force Version option.
This will open a menu that lists all past versions of your software. Select the version of your choice and click Force Version button to downgrade.
Finally, click the Apply button at the top to apply changes and downgrade package.
If you feel that you should not have downgraded, then you can undo the downgrade using the following command.
$ sudo apt update OR $ sudo apt upgrade -y
In this article, we have learnt how to downgrade software in Ubuntu.
How to Downgrade RHEL/CentOS to Previous Minor Version
How to Mount Windows Partition in Ubuntu
Top Hex File Editors in Linux
How to Setup Two Factor Authentication in SSH
How to Delete All Text in File Using Vi Editor