Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Downgrading a package?

  1. #11
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate Development Release

    Re: Downgrading a package?

    I may be wrong here, but that is how I see it.

    A distribution, ie trusty for ex, is a set of packages where all dependencies are satisfied. Some packages are tied up together with metapackages (packages with no code in them, but with a dependency list) or with dependencies, recommends and conflicts.
    Repositories where the package manager knows where to get the packages are maintained by people who do some housekeeping.

    Say you want package A version n-10 below the distribution version, I'm not sure it will be possible with any package manager, or that would be some kind of luck.

    Say package A n-10 requires package B n-5 wich in turn depends on package C n-10, but package C-10 conflicts with package C n you currently have installed. This happens a lot with libraries. How would the package manager resolve that ? This is its role, ensure all installed packages have homogeneous versions.

    Conflicts are used to prevent installing conflicting packages that would break things if installed together. Of course, a user can always manually override the package manager and install other package versions anyway, but not without consequences. You can browse this sub-forum and look at threads where people get stuck installing different packages versions from their own distribution. It usually happens using ppas where devs label version number higher than distribution numbers so that the package manager can update/upgrade. Thinking of it, there is no "downgrade" option to apt-get
    Quote Originally Posted by man apt-get
    Both of the version selection mechanisms can downgrade packages and must be used with care.
    http://debian-handbook.info/browse/s...formation.html

    You cannot just mix up different releases in the source.list or you'll be soon into trouble. If not, then that would again be out of luck imho.

    All in all, you could use the pin version option to keep an installed package at its current version and prevent any upgrade process. Or work with the /etc/apt/preferences.d files, both have their limits and risks.
    http://debian-handbook.info/browse/s...apt.priorities
    http://manpages.ubuntu.com/manpages/...erences.5.html
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |

  2. #12
    Join Date
    Jun 2012
    Beans
    250

    Re: Downgrading a package?

    I'm not sure I've fully understood your explanation,I do reckon that attempting to mix different sources or adding PPAs can/will eventually lead to troubles, my original question however was about the theoretical possibility of rolling back just to the previous version of a given package,using apt-get with the command
    Code:
    install <package-name>=<package-version-number>
    which as you point out should be used with care,but nonetheless should work in principle.
    In reality,it doesn't:I've tried some random packages with the --simulate option and some can apparently be downgraded to some specific version numbers but not to other versions (E: Version 'xxx' for 'package' was not found),some can't be downgraded at all.
    Maybe it has do do with dependencies,maybe for security reasons packages such as web browsers can't be downgraded.

    Pinning of course will work,but you have to do this before upgrading the system-unfortunately you won't know if a program won't work as you expect until you've actually upgraded it,and at that stage you can't actually undo the last update,which is what I was theoretically after.

  3. #13
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate Development Release

    Re: Downgrading a package?

    Quote Originally Posted by cogset View Post
    I'm not sure I've fully understood your explanation,
    Reading over, I may have not been very clear either
    Quote Originally Posted by cogset View Post
    I do reckon that attempting to mix different sources or adding PPAs can/will eventually lead to troubles, my original question however was about the theoretical possibility of rolling back just to the previous version of a given package,using apt-get with the command
    Code:
    install <package-name>=<package-version-number>
    which as you point out should be used with care,but nonetheless should work in principle.
    In principle. When I mentioned "housekeeping", that was regarding the maintaining of the repos, where, for a given release, not all packages versions are kept. From memory, previous versions are removed after 24h (or the repos would grow out gigantic when you think of all the updates coming in, mostly from resolved bugs or new application packages).

    If we get back to your Firefox example, Utopic, Trusty and Saucy have the latest FF 29 and Raring has FF 26. I have not checked, but I guess this situation is a combination of 2 things : 1- dependencies and 2- what the Mozzila Foundation offers, in particular regarding security updates. If they do maintain 26 and 29 for security (this is the point I have not checked) then Ubuntu will only offer these versions and no intermediates that would not get the security patches.
    Quote Originally Posted by cogset View Post
    In reality,it doesn't:I've tried some random packages with the --simulate option and some can apparently be downgraded to some specific version numbers but not to other versions (E: Version 'xxx' for 'package' was not found),some can't be downgraded at all.
    Maybe it has do do with dependencies,maybe for security reasons packages such as web browsers can't be downgraded.

    Pinning of course will work,but you have to do this before upgrading the system-unfortunately you won't know if a program won't work as you expect until you've actually upgraded it,and at that stage you can't actually undo the last update,which is what I was theoretically after.
    Yes, pinning needs to be decided before upgrading. All in all, I think packages managers are not the tools you'd be looking for, and compiling a specific package from sources (provided you can find them) is the only way to achieve what you are exactly looking for.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |

  4. #14
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    2,490

    Re: Downgrading a package?

    Older versions are not kept in the Ubuntu repositories. So downgrading by apt is not supported...and the system will promptly try to upgrade to the newest version again.

    Generally, you must downgrade by finding the desired version of the package on your own, and then downgrading using dpkg instead of apt.

    The dpkg manpage is very clear that downgrading does not include dependency checking, and is at-your-own-risk.

Page 2 of 2 FirstFirst 12

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
  •