In this article, we cover –no-install-recommends option with apt. APT or Advanced Package Tool is a command-line interface for managing packages. With the help of the command-line tool apt, the user can install, remove, and upgrade packages.
You must have noticed while installing any package in Debian or Debian-based Linux distributions like Ubuntu it recommends certain packages which are installed as dependencies.
In certain circumstances, it would be advisable to install the recommended packages. The additional features provided by the recommended packages can be quite useful later. You previously had the experience of working with the package and then you chose not to install the recommended packages and find some features missing.
On the other hand, you understand that there are certain packages that you don’t require at all. But, they are installed as recommended packages and you have the option not to install them. That would optimize the installation process and saves precious disk space as well.
With apt, we get the option to either install or ignore the recommended package installation.
Note: Following operations require Administrative privileges. If you don’t have one then we advise you to contact your System Administrator for assistance.
apt with –no-install-recommends
If you don’t wish to install recommended packages then, use the following option with apt:
sudo apt install --no-install-recommends <pacakge-name>
If you wish to install recommended packages as dependencies then don’t use the –no-install-recommends option.
In conclusion, we have covered here how not to install recommended packages as dependencies with the apt command-line interface for managing packages.