3

Running debian stable, I know I can use unattended-upgrades to automatically download and install upgrades.

However, running debian unstable, I would be extremely reluctant to automatically install upgrades due to the nature of the distribution being unstable. However, I see nothing wrong with pre-downloading the upgrades for convenience. Is there any way to download all the upgrades that I might want to install so that when I aptitude upgrade I don't have to sit and wait for everything to download?

You can assume that disk space and bandwidth per month aren't an issue. (In fact I have considered simply running a full mirror and using my local mirror in my sources.list, but I feel this might be going a tad overboard.)

nullUser
  • 226
  • 1
  • 7

2 Answers2

2

From the apt-get man page:

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

You can thus have a cron job that runs apt-get update; apt-get -d dist-upgrade in place of unattended-upgrades.

Wouter Verhelst
  • 418
  • 3
  • 8
1

You can also use APT::Periodic settings to just download the packages, and disable unattended-upgrades:

// Do "apt-get update" automatically every n-days (0=disable)
APT::Periodic::Update-Package-Lists "1";


// Do "apt-get upgrade --download-only" every n-days (0=disable)
APT::Periodic::Download-Upgradeable-Packages "1";


// Run the "unattended-upgrade" security upgrade script
// every n-days (0=disabled)
// Requires the package "unattended-upgrades" and will write
// a log in /var/log/unattended-upgrades
APT::Periodic::Unattended-Upgrade "0";

As explained the Wiki.

Dario Seidl
  • 416
  • 5
  • 12