I am trying to keep my system clean of various headers and -dev packages. Sometimes I see in many tutorials, setup guides apt install
string which includes multiple package names, where many of those packages are dependencies of some other packages mentioned in the string already. Even if I skip those names, they will be installed anyway (as dependencies).
But the problem is by explicitly mentioning these packages in apt-get install
string, these are being marked as "manually installed" and thus cannot be removed automatically (with apt-get autoremove
) when the main package is no more needed.
For example:
apt install gawk m4 libglib2.0-dev libwxbase3.0-dev wx3.0-headers libwxgtk3.0-dev
Here, the wx3.0-headers
is an automatic dependency of libwxbase3.0-dev
, so it is not needed to be in the install command, and I suspect that libwxgtk3.0-dev
includes them both and maybe libglib2.0-dev
too.
So is there a way to detect these excess dependencies automatically to build a minimal apt
command that is needed to get everything set?
apt
command, even when it would be installed anyway? The package won't be installed twice, or even downloaded twice. – Jos Sep 19 '16 at 15:23