Installing Specific Packages without Recommended Ones using apt
When using the apt package manager to install software on a Debian-based system, it will also install recommended packages by default. This can be a problem if you only want to install the specific package and not its dependencies or recommended packages. In this article, we will show you how to install an apt package without recommended ones using the command line.
Understanding apt Package Management
The apt package manager is a powerful tool for managing software packages on Debian-based systems such as Ubuntu, Linux Mint, and Debian. It allows you to install, upgrade, and remove software packages easily. When you install a package using apt, it will also install any dependencies required by the package. Additionally, it will install any recommended packages by default, which can be unnecessary and take up disk space.
Installing a Package without Recommended Ones
To install a package without recommended ones, you can use the --no-install-recommends option with the apt-get command. For example, to install the vim package without recommended packages, you can use the following command:
sudo apt-get install --no-install-recommends vimThis will install only the vim package and not any of its recommended packages. You can replace vim with any other package name to install that package without recommended packages.
Mistakenly Installed Recommended Packages
If you have mistakenly installed recommended packages along with the package you wanted, you can remove them using the apt command. To remove recommended packages, you can use the following command:
sudo apt-get remove <package-name>-recommendsReplace <package-name> with the name of the package whose recommended packages you want to remove. For example, to remove recommended packages for the vim package, you can use the following command:
sudo apt-get remove vim-recommendsIn this article, we have shown you how to install an apt package without recommended ones using the command line. By using the --no-install-recommends option with the apt-get command, you can install only the package you want without any unnecessary dependencies or recommended packages. Additionally, we have shown you how to remove recommended packages if you have mistakenly installed them.
- Understanding
aptpackage management - Installing a package without recommended ones
- Mistakenly installed recommended packages