From: Ant on
Hi.

I noticed my old Debian box's /var/lib/dpkg/info, from 2005, has a bunch
of old packages that should not be there. I found out it was because I
used remove instead of purge parameter for apt-get command.

I Googled and found https://bugs.launchpad.net/bleachbit/+bug/432991 but
this won't work because it will purge all my other packages which I want
to keep like old KDE v3.5.10. Examples:

# aptitude purge $(aptitude search '~c' | awk '{ print $2 }')
The following packages will be REMOVED:
kcalc{p} kcharselect{p} kcoloredit{p} kcron{p}
kdeaddons-kfile-plugins{u} kfloppy{u}
kget{u} khexedit{u} kicker-applets{u} klipper{u} kmenuedit{u} kmix{u}
konqueror-nsplugins{u} kpager{u} kppp{u} kruler{u} ksnapshot{u}
ksplash{u} ksysv{u}
kwifimanager{u} libaccess-bridge-java-jni{p} libdirectfb-1.2-0{p}
libgcj9-0{p}
libhsqldb-java{p} libvlc2{p} libvlccore2{p} linux-image-2.6.32-3-686{p}
linux-image-2.6.32-4-686{p} openjdk-6-jre{p} openjdk-6-jre-headless{p}
openoffice.org-base{p} scrollz{p} virtualbox{p} virtualbox-3.1{p}
0 packages upgraded, 0 newly installed, 34 to remove and 11 not upgraded.
Need to get 0B of archives. After unpacking 15.2MB will be freed.
Do you want to continue? [Y/n/?]


I only want to purge the old useless ones like:
# aptitude search '~c' | awk '{ print $2 }'
acpid
ca-certificates-java
gij-4.3
irb1.8
kcoloredit
kcron
libaccess-bridge-java-jni
libdirectfb-1.2-0
libgcj9-0
libhsqldb-java
libvlc2
libvlccore2
linux-image-2.6.32-3-686
linux-image-2.6.32-4-686
openjdk-6-jre
openjdk-6-jre-headless
openoffice.org-base
scrollz
virtualbox
virtualbox-3.1


I tried to purge each package manually, but it still wants to do the
others too which I don't want to:

# apt-get purge openjdk-6-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openjdk-6-jre-headless is not installed, so not removed
The following packages were automatically installed and are no longer
required:
kppp kwifimanager kruler ksnapshot kfloppy konqueror-nsplugins kpager
klipper kmenuedit
kicker-applets khexedit ksplash ksysv kget kdeaddons-kfile-plugins kmix
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.

# aptitude purge linux-image-2.6.32-3-686
The following packages will be REMOVED:
kdeaddons-kfile-plugins{u} kfloppy{u} kget{u} khexedit{u}
kicker-applets{u} klipper{u}
kmenuedit{u} kmix{u} konqueror-nsplugins{u} kpager{u} kppp{u}
kruler{u} ksnapshot{u}
ksplash{u} ksysv{u} kwifimanager{u} linux-image-2.6.32-3-686{p}
0 packages upgraded, 0 newly installed, 17 to remove and 11 not upgraded.
Need to get 0B of archives. After unpacking 15.2MB will be freed.
Do you want to continue? [Y/n/?]


Am I missing something or doing this wrong? Thank you in advance. :)
--
"Even the wishes of a small ant reach heaven." --Japanese
/\___/\ Phil./Ant @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.