I'm using Debian Jessie. I'm installing some software Z from source. Installation instructions inform that it depends on Debian package X. I checked in aptitude and I have this package installed, but it is marked as automatically installed (iA).

So if some day I remove package Y that caused package X to be installed my software Z will stop to work. So my question is, how can I change flags of package from iA to i. Preferably using aptitude in non-interactive mode. Thanks!

1 Answer 1


You can use apt-mark for that. From it's manpage:

       auto is used to mark a package as being automatically installed, which will cause
       the package to be removed when no more manually installed packages depend on this

       manual is used to mark a package as being manually installed, which will prevent the 
       package from being automatically removed if no other packages depend on it.

In you case you should mark it as manual. Use a command like this:

apt-mark manual <package-name>
  • 2
    aptitude unmarkauto works too. Oct 10, 2014 at 8:55
  • You can also add a user-tag to a package so that you know why it's needed: aptitude add-user-tag "this is a tag" packagename. This can be seen with aptitude show packagename or in interactive mode when hitting enter while the package is highlighted.
    – wurtel
    Oct 10, 2014 at 9:48

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.