Is apt apting nasty?

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 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 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.

1 Comment
  1. Laura says:


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">