On 2010-01-29, Tech Geek <techgeek12...@gmail.com> wrote: > --00504502ce5da6db1a047e5657d2 > Content-Type: text/plain; charset=ISO-8859-1 > > So I have been using my current Debian instalaltion for almost a year now > and over this time I have installed, purged and deinstalled a lot of > packages. It seems that the status file maintains a list of all the packages > and their current states that have been ever installed on the system since > the fresh installation. > > For example: > debian:/var/lib/dpkg# cat status | grep custom > Package: linux-image-2.6.28-custom-test1 > Package: linux-image-2.6.28-custom-test2 > Package: linux-image-2.6.29-custom-test1 > Package: linux-image-2.6.29-custom-test2 > > The above packages are no longer installed on my system (since last 6 > months) but the dpkg library (status file) stilll keeps track of them. > > So my question is: > Is there any way by which I can regenerate a fresh "/var/lib/dpkg/status" > file for all the packages that are currently installed on my systems? > Nothing is wrong on my system as such but space is premium for me (even 1 MB > matters) as I am using a compact flash of a relatively small size (approx. > 512 MB). Another reason is that I am just curios to find out how to > regenerate it if one has to. >
Don't know if there's automatic way. But one way you can try is to write a script to remove those sections whose "Status" is not "installed" in the file /var/lib/dpkg/status. Jeffrey -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org