Download a package using apt on Debian/Ubuntu

On Debian and Ubuntu servers, you can download a package using apt download command.

apt download PKG_NAME
download package using apt

Package will get downloaded to current working directory. Better do this to /tmp to avoid permission errors.

Method 2

If you want to download package and dependencies, then use

Advertisement

apt-get install --download-only PKG_NAME

This will download the package and all dependency, store it in folder /var/cache/apt/archives.

If you need to remove downloaded packages, run

apt clean
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement