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
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.

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?

  • why not just copy the content of your terminal into the post ?
    – Kiwy
    Apr 2 '14 at 9:13
  • Those packages were never explicitly installed. If you want them to be marked explicitly installed, you can do apt-get install the_package_you_want. It's not clear to me why you think your installation is broken. Apr 2 '14 at 9:25
  • These packages came with the distribution itself alongwith Iceweasel. But upon removing iceweasel this happened. What can I do to stop this notification? Apr 2 '14 at 9:29

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 an Auto-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 their Auto-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 the APT::AutoRemove::RecommendsImportant and APT::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 doing apt-cache show package_name. If you decide to keep some, you can use apt-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 as Auto-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 do aptitude unmarkauto from the command line or change within the curses interface. Within the package lists in the interface, all automatically installed packages have an A next to them. You can change this state by using m to mark an auto installed package as manual and M to mark as manual again (also l to open a search dialog and Enter to view package details).

  • Ok, means I have to mark packages as Manual Installed. Marking packages manually will not create a problem in future. will it? Apr 2 '14 at 11:03
  • Yeah, I would just do the non library ones though, you might find some of the library ones then don't show up since the other ones depend on them.
    – Graeme
    Apr 2 '14 at 11:06
  • @abhishekkannojia, it depends on the system somewhat. I use Debian testing/unstable which is a rolling release. It is good practice to stay on top of these things since there are major changes to packages an dependencies over time and lot of junk can build up. On Ubuntu etc it is not so much of an issue since each release mostly only gets security/bugfix updates, so you only get junk build up if you are installing/uninstalling a lot.
    – Graeme
    Apr 2 '14 at 11:11

to mark all these packages so that they are important and not to be removed, do this:

apt-mark showauto | xargs sudo apt-get -y install

basically by telling apt to install a program you are telling it that you want it to remain on the system permanently.


Why not remove them with the command suggested by apt-get, i.e. apt-get autoremove?

If they were installed by default on Kali and used by the previous web browser, and no longer used now that you have removed this browser, it will not be a problem.

Plus if someday one of the package is needed again, install it explicitly via apt-get and it will not appear as "automatically installed and are no longer required".

The other solution could be to install them manually. They will no longer be marked as "automatically installed and are no longer required" in apt-get, but you will have useless packages, which is not IMO the best solution.

  • I wouldn't necessarily do that, some of the packages may be useful to keep - like gnome-backgrounds
    – Graeme
    Apr 2 '14 at 10:41
  • No they were not used by the browser, they are additional packages came preinstalled in Kali. Most of them are useful like gnome-backgrounds, gnome-font-viewer, gnome-dictionary, empathy etc. Apr 2 '14 at 10:59
  • In my case I have the network manager along with lightdm. I wouldn't call those packages easily disposable expecially since I use them all the time. LOL Aug 10 '15 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.