Updating or upgrading Ubuntu with internet connection is really very easy. All you have to do it type sudo apt-get update in the terminal. If you use GUI, then the update manager regularly pops-up to notify you about the latest updates available.
But what if you are in a situation where you do not have internet access on your Ubuntu powered personal computer. How will you update your Ubuntu OS then? This is one of the common situation faced by many in (specially) developing countries. And to get you out of this situation Ubuntu has this wonderful tool called “apt-offline” that lets you update your Ubuntu powered computer without an internet connection.
There is one tricky thing here though. You need the “apt-offline” to be installed on the target Ubuntu computer, which needs internet connection :( You can install it in the following manner:
sudo apt-get install apt-offline
How to use apt-offline to update Ubuntu offline:
The whole procedure can be categorized in 3 steps:
1. Generate “apt signature” file:
This “apt signature” contains the information about the downloaded and installed packages and thus it will help in determining which packages need to be downloaded on the other (lets say source) computer. Use the following commands in terminal:
sudo apt-offline set ~/my.sig
This will generate the my.sig file in your home directory. You are free to change the path. Now copy this .sig file to a USB drive that could be connected to the computer that has internet access.
2. Download the required packages:
Once you have the .sig file on a USB drive, connect it to an internet connected computer running on Ubuntu and use the following command in the terminal:
apt-offline get -d /to_any_chosen_directroy /path_to/apt.sig
Once you have it downloaded it, copy the downloaded files in the USB key.
3. Install the downloaded packages:
Now when you have the downloaded packages, you can install it on your target Ubuntu computer using the following command:
sudo apt-offline install /path_to_downloaded_package_folder
Voila! Enjoy the latest updates. This works with all the major Ubuntu releases like Ubutnu 12.04, 11.10, 11.04 and 10.10 etc.
If you have questions or difficulties in following the tutorial, feel free to drop a comment. I’ll be happy to help you out. Cheers :)