I recently installed Kali Linux in my system. It came with a preinstalled Iceweasel. However, instead of Iceweasel I wanted to install firefox so I followed this guide and installed firefox successfully.
Now whenever I invoke apt-get
it shows many pre-installed packages as "automatically installed and no longer required":
abhishek@ab-linux:~$ sudo apt-get install
[sudo] password for abhishek:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
empathy empathy-common fonts-cantarell gcalctool gnome-backgrounds
gnome-dictionary gnome-font-viewer gnome-icon-theme-extras gucharmap
libavahi-gobject0 libcaribou-gtk-module libcaribou-gtk3-module
libchamplain-0.12-0 libchamplain-gtk-0.12-0 libgdict-1.0-6 libgdict-common
libgeocode-glib0 libtelepathy-farstream2 nautilus-sendto-empathy
sound-theme-freedesktop telepathy-gabble telepathy-logger telepathy-salut
vino
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
abhishek@ab-linux:~$
Linux Version
abhishek@ab-linux:~$ uname -a
Linux ab-linux 3.7-trunk-amd64 #1 SMP Debian 3.7.2-0+kali8 x86_64 GNU/Linux
How to mark these package as important and required?
Best Answer
Definitely nothing is broken. When a package is installed, there are often other packages that it depends on. These will be automatically installed by
apt-get
. It used to be that you would be forced to use a separate program if you wanted keep track of these packages and remove them if you ever removed the original program that you installed.Now
apt
implements anAuto-Installed
state flag to keep track of these packages that were never installed explicitly. When you uninstall a package you can add the--auto-remove
option to additionally remove any packages which have theirAuto-Installed
flag set and no longer have any packages which depend on it being there (a package may also be kept if another suggests or recommends it depending on the value of theAPT::AutoRemove::RecommendsImportant
andAPT::AutoRemove::SuggestsImportant
configuration options).I would have a look at the list of packages and decide if they are worth keeping, sometimes packages which you may wan to keep are marked
Auto-Installed
by default. You can get information on what the various packages do by doingapt-cache show package_name
. If you decide to keep some, you can useapt-mark manual
followed by the names of the packages you want to keep.Note that usually you would want to have library packages (most packages beginning with
lib
) marked asAuto-Installed
since there are few reasons to have these packages installed on their own - other programs usually require other libraries to run, but they are little use on their own. Even if you are compiling software against the library to need the development package (ending in-dev
) which depends on the library itself, so no need to explicitly install the library.Also using
aptitude
, you can doaptitude unmarkauto
from the command line or change within the curses interface. Within the package lists in the interface, all automatically installed packages have anA
next to them. You can change this state by usingm
to mark an auto installed package as manual andM
to mark as manual again (alsol
to open a search dialog andEnter
to view package details).