Downgrade Ubuntu/Debian using apt preferences

There are people who prefer bleeding-edge software versions, other prefer stability over new features. I'm an advanced Linux user, however I fall into the latter category of users. Recently I discovered my current mixed-version Ubuntu is not as stable as I would like and I decided to revert to older version of Ubuntu (lucid).

Debian apt system allows to set preferences for packages and this method can be used to downgrade packages. First of all you have to declare sources of software of desired distro (lucid) in my case:

$ grep ^deb /etc/apt/sources.list
deb lucid main restricted
deb lucid-updates main restricted
deb lucid universe
deb lucid-updates universe
deb lucid multiverse
deb lucid-updates multiverse
deb lucid-security main restricted
deb lucid-security universe
deb lucid-security multiverse

Then we can declare we prefer lucid even if current package in the system if newer:

$ cat /etc/apt/preferences.d/downgrade-to-lucid
Package: *
Pin: release a=lucid
Pin-Priority: 1010

Package: *
Pin: release a=lucid-updates
Pin-Priority: 1011

Package: *
Pin: release a=lucid-security
Pin-Priority: 1012

As you can see I added updates and security source pacages into account to have such updates already in my system.

This entry was posted in en and tagged . Bookmark the permalink.