I use two scripts, one that runs in the background whenever I am logged in, and one that is allowed through sudo without a password to apt-get update and additionally download packages.
You can download the two scripts I wrote here, or copy and paste them into gedit from below:
http://ubuntuone.com/0tNctmQnF2peAsUmaqtyo3
These are the two scripts I wrote:
The first should be called 'background-runner':
#! /bin/bash
# This will connect and download any new packages every two hours.
# Ideal for use on the development release to save time.
# Downloads almost all packages, not just security releases.
sleep 10m
while true; do
sudo /usr/local/bin/package-downloader update
sleep 120m
done
And the second should be called 'package-downloader':
#! /bin/bash
# This runs as root and is allowed through sudo to only download packages.
if [ $1 = 'update' ]; then
apt-get update
fi
if [ $1 = 'download' ]; then
apt-get update
apt-get --yes --download-only upgrade
fi
To set this up, download or copy and paste the files into gedit and save the files with the names noted above. cd to their location in the terminal and run the following commands:
sudo cp package-downloader background-runner /usr/local/bin
sudo chmod +x /usr/local/bin/package-downloader /usr/local/bin/background-runner
Now we have to allow the package-downloader script through sudo.
Open a terminal and type
sudo visudo
at the bottom of the file add the following line replacing MYUSER with the username you run as, and then hit ctrl+x and then enter to save.
MYUSER ALL=(root) NOPASSWD: /usr/local/bin/package-downloader
Now navigate to 'Startup Applications.' Click add. Name it whatever you like, and enter /usr/local/bin/background-runner for the command. Save this and exit out.
Having logged out and logged back in, the scripts will perform an apt-get update every two hours. You might want to disable the automatic check for updates through the Update Manager's Software Sources dialogue, which you can reach by clicking settings in the bottom left corner. This way update-manager will not check for updates when the script is already doing so more frequently.
The scripts linked here will just do apt-get update by default. If you would like them to also download any packages, you simply need to edit the line in background-runner that says:
sudo /usr/local/bin/package-downloader update
and have it say
sudo /usr/local/bin/package-downloader download
The same can be done for changing the amount of time in between updates and downloads, just change 120m in
sleep 120m
to your desired amount of time in minutes (m) hours (h) seconds (s).
FYI: This could potentially be a security risk if the permissions to /usr/local/bin have been changed. Because package-downloader is a script, and allowed through sudo, BE SURE ONLY ROOT CAN WRITE TO IT!
According to this Fedoraforum.org post, you could try disabling GNOME Software's automatic downloading of updates:
gsettings set org.gnome.software download-updates false
The description of that key reads:
If enabled, GNOME Software automatically downloads updates in the
background and prompts the user to install them when ready.
I don't have any updates on hand to test.
Best Answer
Using gconf-editor check that the Auto-Launch checkbox as shown in this image is ticked.
(As found by Nick) - check also that the option (highlighted) "regular_auto_launch_interval" is set to zero.