Set auto or manually installed flag for packages in Ubuntu or Debian

Written by
Date: 2012-11-28 10:06:32 00:00


Today while installing VirtualBox in my Debian Linux (I want to install Ubuntu on my Debian). Accidentaly I have "re-installed" a package that was already part of the VitualBox combo. So that changed the flag from manual to auto installed in that package.

This is what I have done:

apt-get install virtualbox-dkms

This what Debian replied to me:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
virtualbox-dkms is already the newest version.
virtualbox-dkms set to manually installed.

That means, that if I ever uninstall VirtualBox, virtualbox-dkms will remain installed, I do not want that.

So, I have used apt-mark to set it to auto installed again.

apt-mark auto virtualbox-dkms

And Debian replied:

virtualbox-dkms set to automatically installed.

Everything normal again.