Download packages without installing using apt in Ubuntu/Debian

Apt-get is an advanced packaging tool for Ubuntu and other Debian-based Linux distribution, used primarily to install packages into the system. Running the following apt-get command will automatically download and install the package and all it's dependencies.

sudo apt-get install package-name

If you are for some reason want apt-get to just download the packages and dependencies without installing it, simply add -d switch to the command as 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 done executing.

Download complete and in download only mode

Sign up for Ubuntu Linux Fundamentals - Learn Linux Server with Ubuntu and many other great courses on Udemy to learn more.

Ubuntu Linux Fundamentals - Learn Linux Server with Ubuntu

Gain essential skills with Ubuntu Linux Server in this course. Learn to like the command line interface!

Written by Mohd Shakir Zakaria. Last updated on 2019-03-25