Sunday, June 11, 2017

How to upgrade Ubuntu release while keeping versions of already installed packages

Sometimes it's important to keep current versions of already installed packages when upgrading Ubuntu release, let's say, from 12.04 to 14.04.


I don't emphasize if it's server or desktop assuming this procedure should be same.


Standard release upgrade steps are:



  1. sudo apt-get update

  2. sudo do-release-upgrade


But this will upgrade packages as well.
Is there a way to keep versions of already installed packages?


UPDATE 1:



  • I will perform release upgrades remotely, so I will a need command line solution.
    It's possible to check versions using dpkg, apt-cache policy (and maybe with aptitude, haven't tried yet).


  • I won't have any packages in remote computer's repository. I will just need to specify what versions I need and it will download that required packages.



I feel like I will need to write a custom script to solve this issue, but it doesn't seem the best way - packages will be upgrading along with a release upgrade and then I will downgrade them. It'd be nice if I were able to install/keep required version during a release upgrade process.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...