When I use the packaging tool, it "reminds" me to use autoremove to remove packages which are no longer needed. But when I review the list, I see packages which I wish to keep.
$ sudo apt-get install gnome-tweak-tool
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnome-tweak-tool is already the newest version.
The following packages were automatically installed and are no longer required:
ekiga libopal3.10.2 gnome-backgrounds gtali glchess gnome-games cheese gdebi
gnobots2 gnome-icon-theme-extras libcheese-gtk20 libcheese1 gdebi-core
libcapi20-3 gnibbles gnuchess-book libpt2.10.2 libcluttergesture-0.0.2-0
gnotski gir1.2-gucharmap-2.90 libclutter-imcontext-0.1-0 libspandsp2
cheese-common sound-juicer iagno glines libmx-1.0-2 libfolks-eds25
gnome-contacts gedit-plugins liferea gnotravex gnect quadrapassel
liferea-data gnuchess gnome-video-effects
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
For example, in the above list, gnuchess and gnuchess-book are identified. I don't wish for them to be removed.
QUESTION: Are these metapackages that I need not fight (with apt) to defend from removal? Will I lose the ability to play glchess?
NB. I used gnome-tweak-tool as an example in the commandline, knowing that it was already installed. This is irrelevant to my question.
You don't need to be paranoid, you just need to read and comprehend what
apt-get
is telling you. Obviously, if you removeglchess
, you will lose the ability to playglchess
!At some stage you must have removed a package (probably a metapackage) which depends on some or all of the packages you see.
To figure out which metapackage this might be, you can use
apt-rdepends
. This tool can look up "reverse-dependencies", or packages which depend on a given package.For example, for the package
gnome-backgrounds
:This shows that
gnome-backgrounds
is depended upon by a single package,gnome-core
, which in turn is depended upon bygnome
, which in turn is depended upon bygnome-desktop-environment
which no other packages depend upon.Now you can find out about these packages:
You will see that these are all meta-packages, and on your system at least one has been removed. You can then:
apt-get install
the 'lowest' dependency, in this casegnome-core
. However this may pull in additional packages that you don't actually want to install (read what apt-get says, don't just hit enter).aptitude keep-all
. This will mark the outstanding packages as 'installed', andapt-get
will stop reminding you about them.apt-get install
them before runningapt-get autoremove
. You'll have to read the package descriptions to decide which ones you want.I think the main point here is that
apt-get
is just a tool. It doesn't know what you really want, it just does what you tell it. For this reason you should never blindly trust it to do the 'right thing', because often this is not the same as what you told it to do! This is doubly important to keep in mind when runningsudo
commands, since it's so easy to do catastrophic damage to your system.