Sometimes when using Ubuntu, programs don’t work correctly. If this happens, it may be because a recent upgrade is less stable than the previous version. To fix this problem, you can downgrade software on Ubuntu to an earlier version.
There are a few ways to downgrade software on Ubuntu. Specifically, the Linux terminal (via the apt-cache system) and the Synaptic package manager. In this post, we will demonstrate how to use both of these tools to downgrade software on Ubuntu.
Downgrade software via apt-cache
Ubuntu uses the Apt/Apt-get program management tools. One of the features of these tools is that each time a package is set up on the system, it is archived in something known as the “Apt-cache.” In this cache, you’ll find several different versions of programs you previously installed. So, for example, say six months ago you installed Wine version 3.6. Then, the other day it was upgraded to version 4.0. The 3.6 release is still in the cache and can be used if you need it.
The apt-cache system is a great way to downgrade programs on Ubuntu that give you issues. Though, keep in mind that it’s not 100% reliable. Why? Well, many users run the apt clean command to clean up their Ubuntu systems from excess junk, and one of the results of running this command is that it clears the apt-cache.
Users don’t need to install any software to interact with the apt-cache, as the Ubuntu package manager comes with lots of useful commands built-in. Here’s how it works.
Step 1: Open up a terminal window on your Ubuntu PC by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard.
Step 2: Use the apt-cache show command in the Linux terminal to search Ubuntu’s package cache for the program you want to downgrade.
apt-cache show name-of-program
Step 3: Look through the on-screen printout of search results that the apt-cache search command returns, and keep an eye out for the version of the program you want. For example, if you have issues with Firefox version 65, you should look for a version below that in the search results, etc.
Step 4: Once you’ve found the version of the app you want to force Ubuntu to use, it’s time to install it using the Apt package management tool. Be sure to specify the exact version number you found in the search results of the apt-cache search command in the “version” area of the command below.
sudo apt install packagname=version
Other ways to find versions of packages on Ubuntu
The apt-cache search method of detecting different versions of packages in the Ubuntu apt-cache is pretty reliable. However, it’s not the only way users can find different versions of programs on Ubuntu if they’d like to downgrade a problematic application. Here’s an alternative way to do it, without the “search” command.
Step 1: Open up a terminal on your Ubuntu PC by pressing Ctrl + Alt + T or Ctrl + Shift + T.
Step 2: Run the apt-cache policy command. Using “policy” will show you all available versions of a particular package, as well as where they can be installed.
apt-cache policy packagename
Step 3: Install the program on your Linux system with apt. Like before, you must specify the exact version number.
sudo apt install packagename=version
Downgrade via Synaptic Package Manager
If you’re not a fan of the apt-cache way of doing things, it’s possible to use the Synaptic package manager to force your system to use a specific version of a program — effectively downgrading software. Sadly, the Synaptic package manager was taken out of Ubuntu as a default piece of software some time ago, so before we continue, you must install it. To get it working, launch a terminal window and enter the command below.
sudo apt install synaptic
After installing Synaptic, start it up by searching for it in your application menu. When the program opens up, you’ll be asked to enter your password. Do so.
Once Synaptic is open, look for the search button and click on it. Then, write in the name of the package (aka program) you’d like to downgrade and search for it on the system.
Look through the search results and click on the program you want to downgrade. After that, click on the menu that says “Package,” and choose the “Force version” option.
Clicking “Force version” in Synaptic will bring up a menu for your selected package and allow you to choose alternative versions of the program. Using the menu, select an older version then click the “Force” version button to downgrade.
Finish up the package downgrade process by clicking the “Apply” button at the top.
Undo the downgrade
If it turns out you want to undo your program downgrade on Ubuntu, here’s what to do.
Step 1: Open up a terminal window and run the update command to check for software updates.
sudo apt update
Step 2: Run the upgrade command. Ubuntu will notice that the previously downgraded software is out of date, and will install the latest version automatically.
sudo apt upgrade -y
Looking for a way to uninstall software on Ubuntu? Check out our detailed post on the topic.