-   Debian (
-   -   Package cleanup, apting nasty! (

thinice 03-15-2010 11:28 AM

Package cleanup, apting nasty!
Ok, so today I decided to start cleaning up some packages listed with dpkg -l

But first things first; I'm running Lenny,

Linux a.b.c 2.6.26-2-686 #1 SMP Tue Mar 9 17:35:51 UTC 2010 i686 GNU/Linux
Here's my sources.list:


deb stable main contrib
deb lenny/updates main contrib non-free
deb lenny/volatile main contrib non-free

When I run apt-get autoremove:


The following packages will be REMOVED:
  apt dbus dbus-x11 doc-base esound-clients esound-common fam gdb ghostscript gs-common hicolor-icon-theme kdelibs-data kdelibs4c2a lacheck
  latex-beamer latex-xcolor lesstif2 libakode2 libarts1-akode libarts1c2a libartsc0 libasound2 libaudiofile0 libavahi-client3
  libavahi-common-data libavahi-common3 libavahi-qt3-1 libavc1394-0 libcups2 libcupsimage2 libdbus-1-3 libesd0 libfam0 libflac8 libfreebob0
  libfreezethaw-perl libgs8 libiec61883-0 libilmbase6 libjack0 libjasper1 liblua50 liblualib50 libmad0 libmldbm-perl libogg0 libopenexr6
  libraw1394-8 libsamplerate0 libspeex1 libtiff4 libuuid-perl libvorbis0a libvorbisfile3 libxp6 libxtrap6 libxxf86misc1 lsb-release menu
  menu-xdg oss-compat pgf preview-latex-style prosper ps2eps psfontmgr texlive texlive-base texlive-doc-base texlive-extra-utils
  texlive-fonts-recommended texlive-fonts-recommended-doc texlive-generic-extra texlive-generic-recommended texlive-humanities
  texlive-humanities-doc texlive-lang-cyrillic texlive-latex-base texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc
  texlive-latex-recommended texlive-latex-recommended-doc texlive-math-extra texlive-pictures texlive-pictures-doc texlive-pstricks
  texlive-pstricks-doc texlive-xetex texpower texpower-manual tipa valgrind x11-xserver-utils xpdf xpdf-common xpdf-reader xpdf-utils
WARNING: The following essential packages will be removed.

Apt wants to remove itself?!! Needless to say, I'm not going to do that!
Now, in the past I've just dealt with this; it's happened before where it wants to remove this ton of packages and I've just stepped around it, one day an update came along and cleared the slate.

Additionally, I'm getting this when I try to remove a package.

I -JUST- installed the dialog package for a demo today. So when I want to remove it:


root@dev:/root/mercurial-1.5# apt-get remove dialog
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  texlive-base: Depends: texlive-base-bin (>= 2007-13) but it is not going to be installed
                Recommends: dvipdfmx (>= 1:20050831-1) but it is not going to be installed
                Recommends: lmodern (>= 0.93.3-1) but it is not going to be installed
E: Broken packages

Apt says they're already installed. So I try to remove them and add them back in; and it gives the same issue.

Thoughts on how what the heck is going on?

pentode 03-15-2010 12:26 PM

If you have been doing installs and removals outside of apt, it's hard to say what is going on.

First of all, I'd recommend use of aptitude instead of apt-get. But it's best to use one or the other consistently. Refer to Debian docs and here:

Initially, you will need to run "aptitude keep-all" to avoid having aptitude trying to remove everything. Once you do this, you can do more targeted removals. But I'd suggest reading up on the Debian package management system a little first. If at all possible, software should be installed and removed via aptitude (or apt-get). When you go behind the back of the package management system, unexpected bad things can happen, unless you are careful.

thinice 03-15-2010 12:32 PM

Very few things have been behind the back;

only things that come to mind:
- Mercurial
- Trac
- PHP, various php components

May be a few other things.

I'm manually going through the list and am able to side step some of the remove issues (revolving around tex & ghostscript related packages).
The AUTOREMOVE list is shrinking. Still curious to what happened because nothing fresh had been compiled since the list was empty and when it showed up; only dist-upgrades.

Thanks for the resource, I'll go over it and reorient to aptitude.

Quakeboy02 03-15-2010 01:10 PM


deb stable main contrib
deb lenny/updates main contrib non-free
deb lenny/volatile main contrib non-free

Be careful of this sources.list. You have stable for your main repo and lenny for security and volatile. Stable won't always mean lenny and you may get a bad surprise. Consider changing them all to lenny.

Interestingly enough, I checked autoremove on my system, and it wants to remove file-roller and a number of other things that I use. Strange.

thinice 03-15-2010 03:44 PM

I'm doing a spring-cleaning package search and destroy, and ended up removing most of the packages shown in that autoremove list.

However, apt was still trying to remove itself:


The following packages were automatically installed and are no longer required:
  apt libwrap0-dev
The following packages will be REMOVED:
  apt libwrap0-dev

from /var/lib/apt/status:


Package: apt
Status: install ok installed
Priority: important
Section: admin
Installed-Size: 5128
Maintainer: APT Development Team <>
Architecture: i386
Replaces: libapt-pkg-dev (<< 0.3.7), libapt-pkg-doc (<< 0.3.7)
Provides: libapt-pkg-libc6.9-6-4.6
Depends: libc6 (>= 2.3.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.2.1), debian-archive-keyring
 etc ... etc ...

As you said, you're right - an unexpected surprise from using stable.

I updated my sources to use lenny - then did apt-get update, and then 'downgraded' by doing: apt-get install apt/stable

Lesson learned - specify in sources!

All times are GMT -5. The time now is 01:08 PM.