Storing and reusing Ubuntu updates


Suppose you have two computers running the same version of Ubuntu and you have downloaded and installed the updates on one of the computers. Since you are having a rather expensive or maybe, a limited internet connection, you do not wish to download the updates again for the other computer.

Updates downloaded by aptitude are stored in the directory /var/cache/apt/archives. You’ll find the package files in .deb format(Debian software package format). If these updates are copied to the same directory on the other computer, aptitude will automatically recognise those files and use them as necessary while updating. You can copy the files using a flash drive or write them to a CD if you wish to.
You can copy the packages using this command :
[bash]sudo cp /var/cache/apt/archives/* /path/to/flash/drive[/bash]

Now connect the flash drive to the other computer and copy the files to the /var/cache/apt/archives/ directory there.
After this, you need to update your package information and install the updates found.
Run :
[bash]sudo apt-get update && sudo apt-get upgrade[/bash]

All the required updates will be installed from the /var/cache/apt/archives/ directory(if available). You can also install new packages, and they will not be downloaded if they are available locally.