Simple and easy solution: just specify the unwanted packages with an extra -
after each of them.
Example without the -
switch:
root@debian:~# apt-get install bsd-mailx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
exim4-base exim4-config exim4-daemon-light liblockfile-bin liblockfile1
[...]
Example using the switch to avoid installing exim4-base
. Notice the -
at the end:
root@debian:~# apt-get install bsd-mailx exim4-base-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'exim4-base' is not installed, so not removed
The following extra packages will be installed:
liblockfile-bin liblockfile1 ssmtp
[...]
As you can see, apt-get
does not try anymore to install the exim4-base
package, and it does not try to install its various dependencies (exim4-config
etc).
And if you were wrong and needed that exim4-base
dependency after all, you can just apt-get install
it later!