apt or Advanced Packaging Tool is used by Ubuntu and other Debian-based Linux distribution to install packages into the system. apt will automatically download and install requested packages along with dependencies from its package repository.

Step-by-step video guide:

Running the following apt-get command will automatically download and install the package and all its dependencies.

sudo apt-get install package-name

If you are, for some reason, want apt-get to download the packages and dependencies without installing it, add -d switch to the command like the following.

sudo apt-get install -d package-name

To confirm that the package is not installed, you're presented with the following output when the command is done executing.

Download complete and in download only mode

Guide compatibility:

Operating System
Ubuntu 16.04 LTS (Xenial Xerus)
Ubuntu 16.10 (Yakkety Yak)
Ubuntu 17.04 (Zesty Zapus)
Ubuntu 17.10 (Artful Aardvark)
Ubuntu 18.04 LTS (Bionic Beaver)
Ubuntu 18.10 (Cosmic Cuttlefish)
Ubuntu 19.04 (Disco Dingo)
Discuss the article:

Comment anonymously. Login not required.