Doing spring cleaning on our dev box today – apt has been starting to harp me about wanting to autoremove a lot of useful packages – including apt itself! Odd! I’ve learned a few new things today, that’s for sure.
So I went on a mission today to clean up everything package related on the box. In the end, I cleaned out packages, and freed ~800MB.
Here’s some things you might find useful if apt is being a pain – My biggest problem came in the form of a nasty autoremove message from apt:
The following packages were automatically installed and are no longer required:
The following packages will be REMOVED:
That’s right – apt wanted to remove itself! Turns out this is a product of having a misconfigured sources.list:
deb http://debian.uchicago.edu/debian/ stable main contrib
Somehow, running dist-upgrade over time caused apt to update to the squeeze version of apt
To fix this, I had to change stable to lenny in my sources.list, then you can perform a downgrade on a specific package like so:
Because of your sources.list change, apt will think the proper version is the ‘stable’ one, and will REINSTALL/DOWNGRADE apt for you. This fixed the version issue.