DEV Community

Bijay Kumar Pun
Bijay Kumar Pun

Posted on

Manually downloading a software package using apt

Packages are generally installed with below command:
apt-get install <package_name>
apt install <package_name>

Using the --download-only option will only download the package and not install it
apt install --download-only <package_name>

Alt Text

The downloaded files are inside /var/cache/apt/archives

The package can then be manually installed with dpkg -i <package_name>

Be warned it may cause dependency resolution error for a number of different reason:

  1. The --download-only option only downloads the package and not the dependencies
  2. dpkg can not resolve dependency, which is also why apt or apt-get were built on top of it to solve this and some other drawbacks.

Top comments (0)