When I use apt-get to accidentally install a package which is already installed as a dependency of another package, it breaks that "dependency" by marking the package as
manual instead of
I can manually fix this later using
sudo apt-mark markauto package-name.
Is there a way to tell apt-get (or aptitude, dpkg, or another tool) not to break the link in the first place or to do nothing if the requested package is already installed?
I run into this a couple of different ways:
I have a list of packages to install to make something specific work (from instructions on a website like this).
I have a have a list of all the packages I've added to one install and I copy it so they will all get added to another install - e.g. when I do a clean install rather than an upgrade of my system.