How to not install recommended packages

One of the reasons I really like linux is that generally you can choose what you want to install, the granularity available isn’t as much as it once was but it is still relatively easy to keep the number of packages installed to a minimum by not installing the recommended packages.

By default Debian will install all the additional packages marked as recommended, and though occasionally leaving out a recommended package can cause a problem it doesn’t happen often (the only example I’ve come across recently is the nvidia-driver package) and you can save a lot of disk space by not installing the recommended packages and using localepurge to remove the locale (language) files you don’t need.

To control the packages installed by apt you need to create the following config file.

# nano /etc/apt/apt.conf.d/10norecommends

Then you need to paste the two lines below into the file; the first line tells apt not to install the recommended packages; the second tells apt not to install the suggested packages.

APT::Install-Recommends "0";
APT::Install-Suggests "0";

This entry was posted in Debian, Linux, Ubuntu and tagged , , , . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s