From the aptitude help:

Usage: aptitude [-S fname] [-u|-i]

.. snip ..

markauto     - Mark packages as having been automatically installed.
unmarkauto   - Mark packages as having been manually installed.

.. snip ..

So why when I mark my package as being automatically installed, does aptitude attempt to uninstall it?!

# aptitude -s -y markauto python-pip
The following packages will be REMOVED:
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 468 kB will be freed.
Would download/install/remove packages.

1 Answer 1


The point of marking packages as having been automatically installed is so that aptitude will know to only keep them if they are required by something else. Manually-installed packages are those the user explicitly wants installed, automatically-installed packages are those required to satisfy the dependencies of the manually-installed packages (and automatically installed by tools such as apt-get or aptitude). This is useful for example with libraries: generally speaking you don't install libraries explicitly, you only want those which are needed by the programs you use; so when you install a program, all the libraries it needs are installed as well, and if you remove the program the libraries which are no longer needed are uninstalled too.

So when you mark python-pip as automatically installed, you're telling aptitude to only keep it if something else requires it; presumably nothing does, so aptitude reckons it should be removed!

See the aptitude documentation for details.

  • 1
    Well that's kind of obvious when you have it explained. Have a couple of points on me.
    – mafrosis
    Mar 23, 2015 at 6:09

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.