Clean Debian dpkg status files from purged/not-installed entries. I've had no joy finding a tool to do just this. Here's one that not only removes "purged" and "deinstalled ok not-installed" entries from those files, but also illustrates some use of Xiqual's basic functions. There are no known side-effects yet. If you get to know any of them, let me know, too.To use the program, find your megabyte-sized status file (or whatever the bloated size is), which usually resides in /var/lib/dpkg/ under the name "status". Become the superuser and make a copy of it. Don't skip this step; if this program mangles your file, I can laugh at your stupidity.
Next, run the program on the file, redirecting the standard output to where you want your clean status file to go. Example:
statuscleaner status.backup > status
Now, if this isn't a week-fresh or younger Debian system, you're going to see an awful lot of text printed on the console. This is stderr, which you may also redirect to a file, if need be. Last in the output is the number of entries that were deemed unnecessary.
If you go through the status file manually after this, you might still find some entries with status "deinstall" (among other things). These probably have a few configuration files lying around. It would be wise to check these, if it's anything imporant like a highscore list for some game, or you can just dpkg --purge that, too, if it's just some server configuration file.
Tip: Take everything written in any computer documentation with a grain of salt.
Statuscleaner was written in a matter of minutes without time, motivation or reason to read any Debian documents. If you end up screwing your system up beyond the healing powers of even dpkg -i, I want the details for my list of dastardly deeds.