LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2010, 01:31 AM   #1
embed
LQ Newbie
 
Registered: Mar 2009
Distribution: Pardus, Ubuntu, Arch, H:1, QTmoko
Posts: 14

Rep: Reputation: 2
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.
 
Old 10-30-2010, 02:06 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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

Last edited by EricTRA; 10-30-2010 at 02:08 AM.
 
Old 10-31-2010, 05:54 AM   #3
embed
LQ Newbie
 
Registered: Mar 2009
Distribution: Pardus, Ubuntu, Arch, H:1, QTmoko
Posts: 14

Original Poster
Rep: Reputation: 2
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.
 
Old 12-25-2013, 02:58 PM   #4
kamome
LQ Newbie
 
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
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 ...
 
1 members found this post helpful.
  


Reply

Tags
apt-get, downgrade, unstable



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent apt from deleting packages in /var/cache/apt/archives ? abc.linux Debian 11 11-07-2009 11:46 AM
Apt get packages? Mojojo Linux - Software 2 10-13-2005 11:08 AM
apt-get packages curly08 Debian 3 05-04-2005 06:46 PM
Downgrading all packages to stable keripukki Debian 2 10-25-2004 02:47 PM
apt-get packages Lucasite Debian 3 03-13-2004 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration