If you use the apt command to install packages in the terminal, you’ll see all kinds of output.
If you pay attention and read the output, sometimes you’ll notice a message that reads:
package_name set to manually installed
Have you ever wondered what this message means and why you don’t see it for all packages? Let me share some details in this explainer.
Understanding “Package set to manually installed”
You’ll see this message when you try installing an already installed library or development package. This dependency package was installed automatically with another package. The dependency package gets removed with the apt autoremove command if the main package is removed.
But since you tried to install the dependency package explicitly, your Ubuntu system thinks that you need this package independent of the main package. And hence the package is marked as manually installed so that it is not removed automatically.
Not very clear, right? Take the example of installing VLC on on Ubuntu.
Since the main vlc package depends on a number of other packages, those packages are automatically installed with it.
If you check the list of installed packages that have vlc in their name, you’ll see that except vlc, the rest are marked ‘automatic’. This indicates that these packages were installed automatically (with vlc) and they will be removed automatically with apt autoremove command (when vlc is uninstalled).
Now suppose you thought to install “vlc-plugin-base” for some reason. If you run the apt install command on it, the system tells you that the package is already installed. At the same time, it changes the mark from automatic to manual because the system thinks that you need this vlc-plugin-base explicitly as you tried to manually install it.
You can see that its status has been changed to [installed] from [installed,automatic].
Now, let me remove VLC and run the auoremove command. You can see that “vlc-plugin-base” is not in the list of packages to be removed.
Check the list of installed packages again. vlc-plugin-base is still installed on the system.
You can see two more vlc-related packages here. These are the dependencies for the vlc-plugin-base package and this is why they are also present on the system but marked ‘automatic’.
I believe things are more clear now with the examples. Let me add a bonus tip for you.
Reset package to automatic
If the state of the package got changed to manual from automatic, you can set it back to automatic in the following manner:
sudo apt-mark auto package_name
Conclusion
This is not a major error and doesn’t stop you from doing your work in your system. However, knowing these little things increase your knowledge a little.
Curiosity may have killed the cat, but it makes a penguin smarter. That’s an original quote to add humor to this otherwise dull article :)
Since you are curious about the small details of the apt packages, here are a few more such articles for you.
Understanding sources.list also helps improve your apt package manager knowledge.
Let me know if you would like to read more such articles that may seem insignificant but help you understand your Linux system a tiny bit better.