Little Girl's Mostly Linux Blog

DowngradePackages

Downgrade Packages

This page was last updated on July 18, 2009.

Table of Contents

Introduction

Sometimes you require a specific version of a package that’s lower than the one currently on your system. This page shows you how to choose and specify package versions.

Requirements

Downgrading Packages

Please be careful when deciding to downgrade a package or lock its version. Do some research to be sure doing so won’t negatively impact the rest of the system. If other programs depend on the package, they may not run properly, or at all, with a lower version.

Step 01 – Check the status and version

Check which version of the package you currently have installed and what its dependencies and reverse dependencies are:

Find out the status of a package

  • Type this command in a terminal window, replacing XXX with the name of the package you wish to downgrade:
  • dpkg -s XXX

Find out some information about a package

  • Type this command in a terminal window, replacing XXX with the name of the package you wish to downgrade:
  • apt-cache showpkg XXX

Check which version shipped with Ubuntu

Check which version of the package shipped with your release of Ubuntu. There are two ways to do this. Method 1 is preferred for other editions of Ubuntu like Kubuntu, Edubuntu, Xubuntu and Gobuntu.

  • Method 1 – Check the Live CD
    1. If you have a Live CD of your current release, you can boot the Live CD and use the package manager or the commands listed in Step 01 of this section to determine which version of the package you wish to downgrade was shipped with your release.
  • Method 2 – Download a listing
    1. Choose a link below to download a listing of all software in your original Ubuntu release.
    2. Open the text file inside the file you just downloaded and do a search for the name of the package you wish to downgrade. Note that the information you’re looking for is the version information inside the (brackets) after the file name.
      • Example searching for amarok in the Gutsy Gibbon file:
      • amarok (2:1.4.7-0ubuntu3) versatile and easy to use audio player for KDE

Check the version history

You can check the version history of a package by visiting the package’s home page or clicking in its About or Help menu options. Your package manager may also list a history for the package in one of its tabs. In this way, you can examine all the releases for this package and choose the one that suits your needs.

Step 02 – Choose the version you wish to downgrade to

Now that you know which version of the package you currently have on your computer, which version shipped with the Ubuntu, Kubuntu, Edubuntu, Xubuntu or Gobuntu release, and which additional versions were released, you can choose which version to downgrade to.

In making your decision, keep in mind that your release shipped with a specific version number because it was considered stable at the time of the release. Choosing a version prior to the shipped version could result in unexpected behavior and is not recommended unless you are an advanced user.

Step 03 – Downgrade the package

This command will downgrade the package to the version you chose. There is no need for you to remove the current version first.

  • Type this command in a terminal window, replacing XXX with the name of the package you wish to downgrade, and YYY with the version number you’ve chosen to downgrade the package to:
  • sudo apt-get install XXX=YYY
    • For an example of how this command is used, see the Examples section of this document.

Step 04 – Clean up after yourself

Ubuntu keeps an archive of packages you’ve installed in the /var/cache/apt/archives directory. This command removes the archives of the packages you no longer have installed.

  • Type this command in a terminal window:
  • sudo apt-get autoclean

Step 05 – Lock the package

If you’d like to lock the file at the chosen version so it can’t be updated, see my LockPackages page for instructions.

Examples

  • dpkg -s amarok
  •   Package: amarok
      Status: install ok installed
      Priority: optional
      Section: free/kde
      Installed-Size: 30884
      Maintainer: Medibuntu Packaging Team <admin@lists.medibuntu.org>
      Architecture: i386
      Version: 2:1.4.7-0ubuntu3+medibuntu1
      Depends: amarok-xine, ruby, python-qt3, lsb-release, kdebase-kio-plugins, kdelibs4c2a (>= 4:3.5.7-1), libart-2.0-2
      (>= 2.3.18), libaudio2, libc6 (>= 2.6-1), libfontconfig1 (>= 2.4.0), libfreetype6 (>= 2.3.5), libgcc1 (>= 1:4.2.1),
      libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.14.0), libgpod2, libice6 (>= 1:1.0.0), libidn11 (>= 0.5.18), libifp4,
      libjpeg62, libmp4v2-0 (>= 2.0.0+cvs20040908+mp4v2+bmp), libmtp6, libmysqlclient15off (>= 5.0.27-1), libnjb5,
      libpng12-0 (>= 1.2.13-4), libpq5, libqt3-mt (>= 3:3.3.8really3.3.7), libruby1.8 (>= 1.8.6.36), libsdl1.2debian (>=
      1.2.10-1), libsm6, libstdc++6 (>= 4.2.1), libtag1c2a (>= 1.4), libtunepimp5, libusb-0.1-4 (>= 2:0.1.12),
      libvisual-0.4-0 (>= 0.4.0), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxft2 (>> 2.1.1), libxi6, libxinerama1,
      libxrandr2 (>= 2:1.2.0), libxrender1, libxt6, zlib1g (>= 1:1.2.3.3.dfsg-1)
      Recommends: kdemultimedia-kio-plugins
      Suggests: libvisual-0.4-plugins, konqueror | www-browser, libqt0-ruby1.8, amarok-engines, libxine1-ffmpeg
      Conffiles:
       /etc/kde3/amarokrc 6393330163a140e866f6a16b30788d99
      Description: versatile and easy to use audio player for KDE - Medibuntu package
       Amarok tries to be a little different, providing a simple drag and drop
       interface that really makes playlist handling easy.
      
       Features include:
         - rapid playlist creation, with drag and drop from a directory view
         - context information (lyrics, artist information, similiar tracks/artists)
         - nice playlist browser for your existing playlists (PLS or M3U formats)
         - collection-indexing support, for smart browsing and playlist creation
         - inline ID3 tag editing, capable of retrieving tags via MusicBrainz
         - album cover support: automatically displays album covers from the
           filesystem, or downloaded on the fly
         - miscellaneous audio effects, including crossfading
         - easy bindable global shortcuts, rich DCOP interface
         - On-Screen Display (OSD), fully configurable
         - iPod and iRiver support
      
       Support for XMMS and libvisual visualization plugins is also compiled in (you
       need to have xmms or libvisual0.4-plugins installed to be able to use it).
      
       This package is built with mp3/mp4 support enabled.
       Therefore, it is in Medibuntu as it might violate patents.
      
       This package isn't supported by Ubuntu: DON'T REPORT BUGS TO UBUNTU!
      
       Please report any bug to our bug tracker instead:
        https://bugs.launchpad.net/medibuntu/+bugs
      Original-Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
    
  • apt-cache showpkg amarok
  •   Package: amarok
      Versions:
      2:1.4.7-0ubuntu3+medibuntu1 (/var/lib/apt/lists/packages.medibuntu.org_dists_gutsy_free_binary-i386_Packages) (/var/lib/dpkg/status)
       Description Language:
                       File: /var/lib/apt/lists/packages.medibuntu.org_dists_gutsy_free_binary-i386_Packages
                        MD5: 74580d7722b3edb05e94af802f9c6ebc
      
      2:1.4.7-0ubuntu3 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy_main_binary-i386_Packages)
       Description Language:
                       File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy_main_binary-i386_Packages
                        MD5: 6b98b92735486de96bc144c31cf34666
      
      
      Reverse Depends:
        amarok-xine,amarok
        amarok-xine,amarok 2:1.4.7-0ubuntu3+medibuntu1
        amarok-engines,amarok 2:1.4.7-0ubuntu3+medibuntu1
        ion3-scripts,amarok
        xmms-kde,amarok
        moodbar,amarok
        kde-extras,amarok
        ichthux-desktop,amarok
        amarok-engines,amarok 2:1.4.7-0ubuntu3
        kubuntu-desktop,amarok
        dolphin,amarok
        amarok-xine,amarok
        amarok-xine,amarok 2:1.4.7-0ubuntu3
      Dependencies:
      2:1.4.7-0ubuntu3+medibuntu1 - amarok-xine (0 (null)) ruby (0 (null)) python-qt3 (0 (null)) lsb-release (0 (null))
      kdebase-kio-plugins (0 (null)) kdelibs4c2a (2 4:3.5.7-1) libart-2.0-2 (2 2.3.18) libaudio2 (0 (null)) libc6 (2 2.6-1)
      libfontconfig1 (2 2.4.0) libfreetype6 (2 2.3.5) libgcc1 (2 1:4.2.1) libgl1-mesa-glx (16 (null)) libgl1 (0 (null))
      libglib2.0-0 (2 2.14.0) libgpod2 (0 (null)) libice6 (2 1:1.0.0) libidn11 (2 0.5.18) libifp4 (0 (null)) libjpeg62 (0
      (null)) libmp4v2-0 (2 2.0.0+cvs20040908+mp4v2+bmp) libmtp6 (0 (null)) libmysqlclient15off (2 5.0.27-1) libnjb5 (0
      (null)) libpng12-0 (2 1.2.13-4) libpq5 (0 (null)) libqt3-mt (2 3:3.3.8really3.3.7) libruby1.8 (2 1.8.6.36)
      libsdl1.2debian (2 1.2.10-1) libsm6 (0 (null)) libstdc++6 (2 4.2.1) libtag1c2a (2 1.4) libtunepimp5 (0 (null))
      libusb-0.1-4 (2 2:0.1.12) libvisual-0.4-0 (2 0.4.0) libx11-6 (0 (null)) libxcursor1 (4 1.1.2) libxext6 (0 (null))
      libxft2 (4 2.1.1) libxi6 (0 (null)) libxinerama1 (0 (null)) libxrandr2 (2 2:1.2.0) libxrender1 (0 (null)) libxt6 (0
      (null)) zlib1g (2 1:1.2.3.3.dfsg-1) libvisual-0.4-plugins (0 (null)) konqueror (16 (null)) www-browser (0 (null))
      libqt0-ruby1.8 (0 (null)) amarok-engines (0 (null)) libxine1-ffmpeg (0 (null)) kdemultimedia-kio-plugins (0 (null))
      2:1.4.7-0ubuntu3 - amarok-xine (0 (null)) ruby (0 (null)) python-qt3 (0 (null)) lsb-release (0 (null))
      kdebase-kio-plugins (0 (null)) kdelibs4c2a (2 4:3.5.7-1) libart-2.0-2 (2 2.3.18) libaudio2 (0 (null)) libc6 (2 2.6-1)
      libfontconfig1 (2 2.4.0) libfreetype6 (2 2.3.5) libgcc1 (2 1:4.2.1) libgl1-mesa-glx (16 (null)) libgl1 (0 (null))
      libglib2.0-0 (2 2.14.0) libgpod2 (0 (null)) libice6 (2 1:1.0.0) libidn11 (2 0.5.18) libifp4 (0 (null)) libjpeg62 (0
      (null)) libmtp6 (0 (null)) libmysqlclient15off (2 5.0.27-1) libnjb5 (0 (null)) libpng12-0 (2 1.2.13-4) libpq5 (0
      (null)) libqt3-mt (2 3:3.3.8really3.3.7) libruby1.8 (2 1.8.6.36) libsdl1.2debian (2 1.2.10-1) libsm6 (0 (null))
      libstdc++6 (2 4.2.1) libtag1c2a (2 1.4) libtunepimp5 (0 (null)) libusb-0.1-4 (2 2:0.1.12) libvisual-0.4-0 (2 0.4.0)
      libx11-6 (0 (null)) libxcursor1 (4 1.1.2) libxext6 (0 (null)) libxft2 (4 2.1.1) libxi6 (0 (null)) libxinerama1 (0
      (null)) libxrandr2 (2 2:1.2.0) libxrender1 (0 (null)) libxt6 (0 (null)) zlib1g (2 1:1.2.3.3.dfsg-1)
      libvisual-0.4-plugins (0 (null)) konqueror (16 (null)) www-browser (0 (null)) libqt0-ruby1.8 (0 (null))
      amarok-engines (0 (null)) libxine1-ffmpeg (0 (null)) kdemultimedia-kio-plugins (0 (null))
      Provides:
      2:1.4.7-0ubuntu3+medibuntu1 -
      2:1.4.7-0ubuntu3 -
      Reverse Provides:
    

Downgrade amarok command

In this example I am downgrading amarok to the version that released with Kubuntu Gutsy Gibbon:
sudo apt-get install amarok=2:1.4.7-0ubuntu3



Obligatory Happy Ending

And they all lived happily ever after. The end.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Comment:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: