Debian: how not to automatically install recommended packages
Submitted by Bram Schoenmakers on 10 September, 2010 - 21:00.
Tagged: Computer
I wanted to install dnsmasq on a Debian (lenny) system, but got a bit scared of its dependencies:
mail:/home/dyso# apt-get install dnsmasq
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
dbus dbus-x11 dnsmasq-base libdbus-1-3 libexpat1 libx11-6 libx11-data libxau6 libxcb-xlib0 libxcb1 libxdmcp6
Suggested packages:
resolvconf
The following NEW packages will be installed:
dbus dbus-x11 dnsmasq dnsmasq-base libdbus-1-3 libexpat1 libx11-6 libx11-data libxau6 libxcb-xlib0 libxcb1 libxdmcp6
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 1718kB of archives.
After this operation, 7078kB of additional disk space will be used.
Do you want to continue [Y/n]?
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
dbus dbus-x11 dnsmasq-base libdbus-1-3 libexpat1 libx11-6 libx11-data libxau6 libxcb-xlib0 libxcb1 libxdmcp6
Suggested packages:
resolvconf
The following NEW packages will be installed:
dbus dbus-x11 dnsmasq dnsmasq-base libdbus-1-3 libexpat1 libx11-6 libx11-data libxau6 libxcb-xlib0 libxcb1 libxdmcp6
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 1718kB of archives.
After this operation, 7078kB of additional disk space will be used.
Do you want to continue [Y/n]?
Whoa, I don't want libx11 on a simple mail server. Luckily, with some Googling I came across this bug report which explains to add the following lines to /etc/apt/apt.conf.d/90norecommends:
APT
{
Install-Recommends "false";
};
{
Install-Recommends "false";
};
Not an intuitive solution for a Debian newbie like me, so I'd better note it down.