Save disk space with apt-get option "no-install-recommends" in Xubuntu
Every package in Ubuntu has a set required packages, a set of recommended packages and a set of suggested packages. The required packages are dependencies, so their installation is mandatory, but the installation of other two sets can be skipped. The recommended and suggested packages are not essential to the functioning of the package being installed. Disabling the installation of recommendations allows to save a lot of disk space.
Example 1: recommendations enabled
$ sudo apt-get install texworks ... The following extra packages will be installed: lmodern luatex texlive-base texlive-binaries texlive-common texlive-doc-base texlive-latex-base texlive-latex-base-doc texlive-luatex texworks-help-en Suggested packages: perl-tk texlive-xetex texworks-scripting-lua texworks-scripting-python The following NEW packages will be installed: lmodern luatex texlive-base texlive-binaries texlive-common texlive-doc-base texlive-latex-base texlive-latex-base-doc texlive-luatex texworks texworks-help-en 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 91.6 MB of archives. After this operation, 174 MB of additional disk space will be used. Do you want to continue [Y/n]?
Example 2: recommendations disabled
$ sudo apt-get install texworks ... Suggested packages: texlive-xetex texworks-scripting-lua texworks-scripting-python Recommended packages: texlive-latex-base texworks-help-en The following NEW packages will be installed: texworks 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 2,360 kB of archives. After this operation, 3,617 kB of additional disk space will be used. Do you want to continue [Y/n]?
This is a great example of the amount of disk space that can be saved: 4MB against 174MB.
Disable automatic recommendations
Disable recommendations temporally (for single package installation), adding the
sudo apt-get install package --no-install-recommends
Disable recommendations permanently, using
echo -e 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' | sudo tee /etc/apt/apt.conf
Alternatively, Synaptic (available at Applications Menu > Settings > Synaptic Package Manager) can be used to disable automatic installation of recommend packages. Just access Settings > Preferences > General and uncheck "Consider recommended packages as dependencies".