I'm in a situation where the list of orphaned packages to be removed by apt-get autoremove
includes a package that I want to keep. Apparently I have accidentally removed a package which was depending on it. How can I now mark the package as explicitly desired, so that apt-get autoremove
will not remove it?
Ubuntu – How to exclude a package from apt-get autoremove
aptpackage-management
Best Answer
Use
apt-mark
So
Now
autoremove
won't remove it.To undo
Now
autoremove
will remove the package if it is not a dependency of any other package.