[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: help in purging old packages



Comer Duncan wrote:
> I have a situation in which I am running wheezy 7.7 and for various reasons
> now want to purge all packages which for some reason are still present from
> etch, lenny, and squeeze.  What I would like to know is how can I purge all
> such packages using dpkg?  I can not seem to find how to select just those
> old packages for purging. Can those who know about this please help?

If you are an apt-get command line person (like I am) instead of the
aptitude methods already mentioned then you can use apt-show-versions
to show you what is installed but no longer has an install candidate.

  apt-show-versions | grep -v uptodate

Packages that match what are in the archive say "uptodate".  The grep
-v removes those lines.  What are left are all of the other
interesting packages.  I will include a list from a system of mine for
an example.  (And I guess I have some cleaning to do on my system.)

With the list in hand you can then use judgement and purge them off.

Bob

Example:

$ apt-show-versions | grep -v -e uptodate -e bpo7
ddrescue 1.14-1 installed: No available version in archive
doc-linux-text 2008.08-1 installed: No available version in archive
foomatic-filters-ppds 1:4.0.4-3 installed: No available version in archive
kerneloops 0.12+git20090217-1 installed: No available version in archive
libarchive1 2.8.4.forreal-1+squeeze2 installed: No available version in archive
libdb4.8 4.8.30-2 installed: No available version in archive
liblzma2 5.0.0-2 installed: No available version in archive
libmozjs10d 10.0.12esr-1 installed: No available version in archive
libnotify1 0.5.0-2 installed: No available version in archive
libssl0.9.8 0.9.8o-4squeeze14 installed: No available version in archive
linux-image-2.6.32-5-686 2.6.32-48squeeze3 installed: No available version in archive
powernowd 1.00-1.1 installed: No available version in archive
python2.5 2.5.5-11 installed: No available version in archive
python2.5-minimal 2.5.5-11 installed: No available version in archive
python3-dvdvideo 0.1 installed: No available version in archive
python3.1 3.1.3-1 installed: No available version in archive
python3.1-minimal 3.1.3-1 installed: No available version in archive
sun-java6-bin 6.26-0squeeze1 installed: No available version in archive
sun-java6-jre 6.26-0squeeze1 installed: No available version in archive

Attachment: signature.asc
Description: Digital signature


Reply to: