Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I install a debian package but make apt consider it automatically installed? I.e. if I later run apt-get autoremove, this package would be uninstalled.

share|improve this question

The best way I've found is to run:

apt-get install mypackage myotherpackage
apt-mark auto mypackage myotherpackage

If you have aptitude installed, you can also do:

aptitude -o Aptitude::Delete-Unused=false install mypackage+M myotherpackage+M
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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