LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Downgrading packages with apt-get (https://www.linuxquestions.org/questions/linux-software-2/downgrading-packages-with-apt-get-841314/)

embed 10-30-2010 01:31 AM

Downgrading packages with apt-get
 
I enables some alpha repositories on my device(n900) and as expected, upgrades from there broke a lot of things. Now I disabled the repository but the newer versions of the packages are still installed.
is there a way to check for all packages, if the installed version is newer than the repository version? So that I can downgrade them? The package management is apt.
The main problem is I don't exactly remember what I upgraded so manual (apt-get remove/ then install) downgrade is not much of an option. I think I changed some python libraries that broke my system.

EricTRA 10-30-2010 02:06 AM

Hello,

There are ways you can find out what you changed ;) Have a look at these logs:
Code:

/var/log/apt/history.log
/var/log/dpkg.log

These logs tell you what you have installed with the date and time so it should be relatively easy to find out what you did. Then if you want to downgrade using apt-get you just find out the version you want to install by searching the apt cache for your standard repositories and install that using the version number.

For example if you have package B upgraded you look for available versions of package B in your standard repositories using:
Code:

apt-cache showpkg B
which will show you under Provides the version number to use. The last thing to do is use apt-get to install the package with the previous version number, not only the package name (since that will tell you that the latest version is already installed. If you use:
Code:

apt-get install B-version-number
referring to the COMPLETE package name you want to install then apt will tell you that the package will be DOWNGRADED. Accepting with yes (y) should downgrade and hopefully fix your problems. First find out what you did searching the logs I pointed too and then take it step by step.

Kind regards,

Eric

embed 10-31-2010 05:54 AM

Unfortunately, n900 does not keep those logs by default, maybe into the ramdisk. In any case, I don't have them. I'll look for some other way.

kamome 12-25-2013 02:58 PM

Old thread, but for people who happen to come across this with similar needs:
"apt-show-versions" from package apt-show-versions will show (without being given a package name) the versions and repositories of all your installed packages (you might have to have the "too new repository" still enabled, I don't know). If you grep that output for the newer repo (and possibly filter out the "manually upgradable" messages), you should end up with a list of all the packages you might want to downgrade ...


All times are GMT -5. The time now is 01:37 AM.