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.

1 Answer 1


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .