I want to generate a package download list, which can be used to download those packages from another system. (I have a slow connection). I want to use those downloaded files to create a local repository from which I can install/upgrade my system.
How can I achieve this?
Best Answer
First Note that, You must have the updated package indexes (these indexes are used by package management softwares to get information about the available packages online). So, you must download at least those index files.
To do so, open a terminal and give this command. (You must have a working internet connection for this step)
After you have the update package index files, use any of the method below:
Terminal way without synaptic
Use this command to generate an list of files needed to upgrade your system
The file
download-list
will be created in the current folder of the terminal.Or, If you want to generate a download script for a specific package, use this command (see the update section below for another command)
replace,
<package-name>
with actual name of the package. such asgtg
for getting-things-gnome etc.You can now use this file to feed any download manager which support input files with URLs.
For example to use this file with
wget
use this command below,assuming
download-list
file is in the current directory of the terminal. The downloaded files will be stored in the current working directory of the terminal.Update: I've found another command to generate package download list:
Credit of the updated command: answerer of this post
Graphical way using Synaptic
Synaptic package manager has built-in feature to generate package download script and you don't even need to to use wget explicitly in terminal, Only executing the script is sufficient.
The procedure is as follows
Install Synaptic Package Manager using terminal:
(First command is not required, if you have updated package index files, If you are not sure, use both).
Then open Synaptic Package Manager by Typing Synaptic in the dash.
Select a package in the right section of the window, Right Click → Mark it for installation. Alternatively, If you want to generate an upgrade script, push the button Mark All Upgrades in the toolbar. The image below uses the second method.
When asked if you want to Mark additional required chanages, press the Mark button.
Then going to File --> Generate package download script, save the script as a file by give it a name and select a directory where to save it. Now, You have a script for package downloads.
If you want to download, Go to the scripts directory and run
sh ./<script-name>
. For example, if the name of the script isdownload-list
and it is in your Downloads folder, the command is