Ubuntu’s Update Manager keeps your packages at the latest version, but occasionally a new package version may not work properly. You can downgrade an installed package and lock it at a specific version to prevent it from being updated.

This is particularly useful when you run into an updated package with a regression – a bug that prevents things from working properly.

How It Works

Your system generally has multiple versions of a package available in its repositories – for example, when Ubuntu updates a package, it places the new, updated package in a special updates repository. The old package is still located an Ubuntu’s main repository and can be installed with a few tricks. If you’ve installed a newer version of a package from a personal package archive (PPA), the older packages included with Ubuntu are still located in Ubuntu’s repositories.

As Synaptic warns us, this can cause problems with the package’s dependencies. Ubuntu’s software management system isn’t designed for downgrading packages – considering this an unsupported trick.

Graphically – Synaptic

The Ubuntu Software Center’s simplified interface doesn’t offer the option to downgrade packages. However, Synaptic, a more advanced graphical package manager interface that Ubuntu used to include, offers this option. To downgrade a package graphically, first install the Synaptic application.

After you do, open the Synaptic Package Manager from the Dash.

Search for the package you want to install an older version of in Synaptic, select it, and use the Package –> Force Version option.

Select the version you want to install and click Force Version. Synaptic will only show you versions available in your repositories.

Click the Apply button to apply your changes and install the older version of the package, assuming everything works properly.

After you downgrade the package, select it and use the Package –> Lock Version option. If you don’t do this, Ubuntu will try to upgrade the installed package the next time you update your installed packages.

Terminal – apt-get

You can install a specific version of a package with apt-get in the terminal. First, determine the available versions you can install with the following command

apt-cache showpkg packagename

Next, run the apt-get install command and specify the package version you want to install.

sudo apt-get install packagename=version

After it’s installed, run the following command to hold your installed version, preventing the package manager from automatically updating it in the future:

sudo echo “package hold” | sudo dpkg –set-selections

Profile Photo for Chris Hoffman Chris Hoffman
Chris Hoffman is Editor-in-Chief of How-To Geek. He's written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times and Reader's Digest, been interviewed as a technology expert on TV stations like Miami's NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read more than one billion times---and that's just here at How-To Geek.
Read Full Bio »