Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Downgrading a package?

  1. #1
    Join Date
    Jun 2012
    Beans
    310

    Downgrading a package?

    I've tried to downgrade a package (using first the -s option,just to be sure I wasn't going to break anything) with
    Code:
    apt-get install <package-name>=<package-version-number>
    and I was surprised to see that it doesn't actually work the way I was expecting.
    If I pick for instance gedit, I can see just two version numbers available with apt-cache show,which are 2.30.3-0ubuntu0.1 and 2.30.0git20100413-0ubuntu1 : with the command listed above,I can indeed simulate installing the oldest available version of the two,which is 2.30.0git20100413-0ubuntu but then any other version that I can see in the changelogs isn't available,trying to install 2.30.0-0ubuntu1 results in this error
    Code:
    E: Version '2.30.0-0ubuntu1' for 'gedit' was not found
    As far as I can tell,this applies to every package I've tried so far:the available versions seem to be the current installed and the oldest one for a given release,all other intermediate versions that I can see with aptitude changelog are not available.

    Looking at it,there's no way I can eventually roll back to just the previous version of a package,because it won't be available-is this the normal situation,and if so,which options do I have to downgrade a package if I wish so?

  2. #2
    Join Date
    Dec 2007
    Beans
    12,521

    Re: Downgrading a package?

    Quote Originally Posted by cogset View Post
    ...
    If I pick for instance gedit, I can see just two version numbers available with apt-cache show,which are 2.30.3-0ubuntu0.1 and 2.30.0git20100413-0ubuntu1 : with the command listed above,I can indeed simulate installing the oldest available version of the two,which is 2.30.0git20100413-0ubuntu but then any other version that I can see in the changelogs isn't available,trying to install 2.30.0-0ubuntu1 results in this error
    Code:
    E: Version '2.30.0-0ubuntu1' for 'gedit' was not found
    ...
    Can you please explain?
    To my mind, it is more like apt-cache policy rather than apt-cache show and when I run apt-cache policy gedit, I get
    Code:
    [01:28 PM] ~ $ apt-cache policy gedit
    gedit:
      Installed: (none)
      Candidate: 3.10.4-0ubuntu4
      Version table:
         3.10.4-0ubuntu4 0
            500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
    [01:29 PM] ~ $
    This is with Ubuntu 14.04. What version of Ubuntu are you using?

  3. #3
    Join Date
    Jun 2012
    Beans
    310

    Re: Downgrading a package?

    I'll try to explain:as a proof of concept,in case I may want to downgrade a package,I've picked some random packages (the example was from Lucid using gedit,but I've also tried in Quantal using firefox and other packages),first checked the installed version with apt-cache policy,then the available versions with apt-cache show,then the changelogs with aptitude changelog:what I've seen is that I don't really have the option to downgrade/roll back to a previous version of choice using
    Code:
    apt-get install <package-name>=<package-version-number>
    ,because for any given package there are only two versions available,the current and what appears to be the oldest one.
    When trying to downgrade to any other version listed in the changelogs using the command above,it fails with
    Code:
    E: Version 'xxxxx' for 'package' was not found
    What I've seen is that actually on http://packages.ubuntu.com/ there are indeed no older packages,they are in http://archive.ubuntu.com :so maybe the only way to downgrade a package if one really wishes so,is to download the .deb package from there and manually install it?

  4. #4
    Join Date
    Dec 2007
    Beans
    12,521

    Re: Downgrading a package?

    I've never tried to downgrade but wouldn't you (or APT) need to have access to the repository for the older software? So if you're on 14.04 and you want something from 10.04, won't you need to somehow add that to sources.list (or wherever)?

  5. #5
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Downgrading a package?

    The process of reverting to a previous version of a package on Ubuntu is normally:
    Code:
    sudo apt-get remove package_name
    gksudo gedit /etc/apt/sources.list -> comment out the ppa providing the new package
    sudo apt-get update
    sudo apt-get install package_name
    Or using Synaptic
    1. start Synaptic Package Manager
    2. search for your package, click on it and select mark for removal
    3. click apply
    4. go to Settings > Repositories > Third Party Software and uncheck the PPA providing the new packge
    5. Click Close, and then Reload
    6. search for the package and reinstall it.

    Optionally, you can re-enable the PPA after reverting to the Ubuntu default package

  6. #6
    Join Date
    Jun 2012
    Beans
    310

    Re: Downgrading a package?

    OK,let me try again:this has nothing to do with PPAs as far as I'm concerned,neither with installing packages from a previous release,in which case I can see how editing sources.list would be necessary.
    The assumption is something like that:
    • I'm using Firefox 28 in Quantal
    • an update to Firefox 29 is installed
    • I don't like Firefox 29,or something doesn't work,I decide to roll back to Firefox 28
    • Firefox 28 is not available at this point:I can only install,and I know because I've simulated this with
      Code:
      apt-get -s install Firefox=<firefox version>
      version 11,which is exactly the only other version,aside of the current one,I can see with apt-cache show firefox
    • Firefox 28,or any other intermediate version,can't be installed with the command
      Code:
      apt-get -s install Firefox=<firefox version>
      because it throws an error saying "package not found"
    • Upon checking,Firefox 28 and previous versions are indeed not available in http://packages.ubuntu.com but they are in http://archive.ubuntu.com ,so I maybe should add this line to my sources to eventually perform a downgrade?

  7. #7
    Join Date
    Dec 2007
    Beans
    12,521

    Re: Downgrading a package?

    Quote Originally Posted by cogset View Post
    ... so I maybe should add this line to my sources to eventually perform a downgrade? ...
    That's my guess.

    With specific reference to Firefox 29, I don't have too many extensions and so installing CTR helped me get back what I wanted.

    Also see http://ubuntuforums.org/showthread.php?t=1036360 which suggests you can pick up a .deb from
    http://archive.ubuntu.com/ubuntu/pool/main/. You may need to uninstall the existing version before installing the .deb. That would avoid modifying your sources file. Again, just a guess.
    Last edited by vasa1; May 12th, 2014 at 03:06 PM.

  8. #8
    Join Date
    Jun 2012
    Beans
    310

    Re: Downgrading a package?

    Thinking of it,you can't really add http://archive.ubuntu.com/ nor http://packages.ubuntu.com/ to your sources,as the first one you have already and the second isn't a proper source-so it seems that in my case the possibility to downgrade a package using apt is just theoretical,the only way to actually accomplish this would be to manually download and install the .deb package of choice from http://archive.ubuntu.com/ubuntu/pool/main/ as we've concluded.
    That is,unless some apt guru doesn't chime in and say otherwise.

  9. #9
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,724

    Re: Downgrading a package?

    Regarding Firefox versions, you can install another version of Firefox without removing Firefox 29. You would download the .tar.bz archive file from Mozilla for the version you want, create a different profile for it (important), and make a separate launcher. You can then run either one.

  10. #10
    Join Date
    Jun 2012
    Beans
    310

    Re: Downgrading a package?

    Yes,I've done that several times:it was really a question about apt,I've used Firefox just as an example.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •