Tales of an IT Nobody

devbox:~$ iptables -A OUTPUT -j DROP

Is apt apting nasty? March 15, 2010

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.

You can see more diagnostic information/steps on my linuxquestions forum post.
I also came across a handy resource in downgrading that goes into good depth here.

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:
   apt libwrap0-dev
The following packages will be REMOVED:
   apt libwrap0-dev

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:

  deb http://debian.uchicago.edu/debian/ lenny main contrib
  cd /var/cache/apt/archives/
  rm -rf *
  mkdir partial
  apt-get update
  apt-get install apt/stable
  apt-get update && echo “For good measure!”

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.

Categories: Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *