When I go to internet cafe, I'd like to take that opportunity to upgrade the system. Sometimes though there is not electrical sockets in the cafe. To conserve batteries I'd like to be able to only do the "download" part of the upgrade process, and apply the new packages later, at home.

I know that I can just interrupt the apt-get dist-upgrade process just after it downloads the packages. I want to have a hands-free solution, that I can use in my custom download-all-upgrades.sh script.

It is possible to just download the package with aptitude, but it works only when I know the package name. It doesn't work with upgrade.


You can pass apt-get the -d option to only download the packages.

apt-get dist-upgrade -d

From man apt-get:

    -d, --download-only
           Download only; package files are only retrieved, not unpacked or installed. Configuration Item: APT::Get::Download-Only.

From man aptitude

-d, --download-only

Download packages to the package cache as necessary, but do not install or remove anything. By default, the package cache is stored in /var/cache/apt/archives.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.