–no-install-recommends                                                                                                                                                                                                     |
It will avoid downloading any kind of recommended packages that are not strictly required by the package (installed/upgraded/reinstalled/installed). One must be caution while using this because there may be some package needed for your requirement. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
sudo apt-get –no-install-recommends [Command] [package_name] Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â |
sudo apt-get –no-install-recommends install firefox                                                                                                                                                                                                                                                                                                                                                                             |
–install-suggests |
It works opposite of `–no-install-recommends`. It downloads all the suggested packages that are not required much. |
sudo apt-get –install-suggests [Command] [package_name] Â |
sudo apt-get –install-suggests install firefox  |
-d or –download-only |
In this package is only downloaded in the location (`/var/cache/apt/archives/`) by default, it is not installed, we can further in future install it. |
sudo apt-get -d [command] [package_name] Â |
sudo apt-get -d install vlc  |
-f or –fix-broken |
By passing this option, the user specifies that apt-get should attempt to correct the system with broken dependencies in place. |
sudo apt-get -f install  |
sudo apt-get -f install  |
-m or –ignore-missing or –fix-missing |
By passing this option, the user specifies that apt-get should ignore the missing packages (packages that cannot be retrieved or fail the integrity check) and handle the result. |
sudo apt-get -m install [package_name] Â |
sudo apt-get -m install apache2 Â |
–no-download |
In this `apt-get` is instructed to download packages already available in cache, not to download any package from configured package sources. |
sudo apt-get –no-download install [package_name] Â |
sudo apt-get –no-download install vim  |
-q or –quiet |
This is used to silence the output errors or displaying warning messages. It is useful while writing scripts. |
sudo apt-get -q install [package_name] Â |
sudo apt-get -q install apache2 Â |
 |
 |
 |
 |
-s or –simulate or –just-print or –dry-run or –recon or –no-act |
In this package in not actually installed, it just shows what operations it will perform while installing that package. |
sudo apt-get -s install [package_name] Â |
sudo apt-get -s install firefox  |
-y or –yes or –assume-yes |
It automatically promotes yes while installing a package if there is any request or conformation that has to be taken from user, but one should be careful while using this. |
sudo apt-get -y [command] [package_name] Â |
sudo apt-get -y install vim  |
–assume-no |
It automatically passes no to any question that will arise during the installation of any package. |
sudo apt-get –assume-no install [package_name] Â |
sudo apt-get –assume-no install apache2 Â |
–no-show-upgraded |
Used to suppress the list of upgraded packages that is normally displayed at the end of the upgrade process. (Only works on upgrade command don’t work on install, remove or purge etc). |
sudo apt-get –no-show-upgraded upgrade  |
sudo apt-get –no-show-upgraded upgrade  |
-V or –verbose-versions |
Used to display the version number of all the available packages including those that are not even installed. (Only work on update command, not on any other like upgrade, install, remove or purge etc) |
sudo apt-get -V update  |
sudo apt-get -V update  |
–show-progress |
Used to display a bar for the progress of the command. (Only used for update command and has no effect on commands like upgrade, install, remove or purge etc) |
sudo apt-get –show-progress update  |
sudo apt-get –show-progress update  |
-b or –compile or –build |
build-dep is used to install the build dependencies of the specified packages and `-b` is used to build a package from source. |
sudo apt-get build-dep [package_name]
       “or” sudo apt-get -b source [package_name] Â
|
sudo apt-get build-dep firefox
           “or” sudo apt-get -b source vlc Â
|
–no-upgrade |
It is to install a package without upgrading to a new version. (Only works with install command) |
sudo apt-get install [package_name] –no-upgrade  |
sudo apt-get install vim –no-upgrade  |
–only-upgrade |
It upgrades the package to the newer version while stopping the installation of other packages from being upgraded during the update process. |
sudo apt-get install –only-upgrade [package_name] Â |
sudo apt-get install –only-upgrade firefox  |
–reinstall |
It reinstalls the package, even if the package is installed. |
sudo apt-get install –reinstall [package_name] Â |
sudo apt-get install –reinstall firefox  |
-h or –help |
It is used to display a help manual. |
apt-get –help  |
apt-get –help  |