Possible Duplicate:
How can I install software offline?

I want to download and save some deb files, and preferably their dependencies, of certain apps, from the repositories (apt-get, aptitude) to a custom location without installing, so that I can install those apps while the machine is off-line. Also I want to know if it is possible to download deb files for a 64 bit machine on a 32 bit machine.


7 Answers 7


You can save all the deb files with dependencies using the following command

sudo apt-get --download-only install packagename

And the files will be stored under /var/cache/apt/archives

If you need to download Ubuntu packages using another machine or OS, check the desired packages in Synaptic and select File > Generate package download script.
You can download 32 bit and 64 bit packages for offline installation here.

First run apt-get clean, so that the directory will be empty. then if you want (say) a2ps package and all dependencies, you should type
sudo apt-get --download-only install a2ps.The packages will be stored in /var/cache/apt/archives.You can use this for offline installation.

You can also download packages for offline installation in the below site, http://packages.ubuntu.com/

  • http://ubottu.com/ljl/apt/ link is 404. Jul 13, 2018 at 10:31

I got tired of re-installing all my software after a fresh install, so here's what I did...

mkdir /home/jj/Documents/Repository

and a loop to get them there...

for i in `ls -1 /var/cache/apt/archives` ; do sudo cp /var/cache/apt/archives/$i /home/jj/Documents/Repository ; done

They are owned by root, so I 'chown jj:jj *' so I could copy them to my backup medium. ( I have /home as sda3, so manual partition setup during (re)-install saves my /home partition).

To re-install all of them in 1 kickstart:

sudo dpkg -i /home/jj/Documents/Repository/*.deb

And here's a bash script because we HATE typing repetitive stuff.

for i in `ls -1 /var/cache/apt/archives/` ; do sudo cp /var/cache/apt/archives/$i /home/jj/Documents/Repository ; done

You can ignore this error "cp: omitting directory `/var/cache/apt/archives/partial'"

Mine is empty.

Here's a cleanup script by karthick87


Keryx can download packages for any offline Ubuntu computer from any online Linux or Windows computer.

Just create a "Keryx project" on the offline computer, load it on your online computer to download packages, then return to the offline computer for installation.

  • 1
    http://keryxproject.org/ link is 404. Jul 13, 2018 at 10:32
  • @luckydonald updated. The project isn't maintained any more (my fault, really), but it's still available on Launchpad. Jul 13, 2018 at 12:26

I think this will answer the first part of your question, yes you can download packages for offline installation, when you use the synaptic package manager and select an application for installation there is an option in the dialog that pops up after the apply button is pressed that says; download package files only,if you check this and you have either the "Leave all downloaded packages in the cache" or "Only delete packages which are no longer available" checked in the dialog in synaptic, your application package and dependencies will be available to you offline in this location; /var/cache/apt/archives, after you click apply and synaptic finishes.

you can use apt-get with the -d switch to do this by typing in your terminal; sudo apt-get -d install package.


if it's just something form the main repository and you don't need dependencies and stuff, you can try looking in http://packages.ubuntu.com/

you can download packages to wherever for whatever. if it's something that has a lot of dependencies though it can be annoying to to search them all on that site and download them separately.


you can download packages only from developer sites and you can also download files for a 64 bit machine on a 32 bit machine...


You can use the Apt-Off script : https://help.ubuntu.com/community/AptGet/AptOfft

Copy it to a usb disk and on the PC without Internet go to the usb disk directory with a terminal and then :

./apt-off --generate something anotherthing ect


./apt-off --generate dist-upgrade

That will create a file named offline.packages on the usb disk. Plug the usb disk on a PC with Internet (a Linux distribution but you don't need to have apt, you just need wget) and then :

./apt-off --download

That will download all the necessary packages on the usb disk. Wait until it's finished and then plug the usb disk on the PC without internet and :

./apt-off --extract

And you're done.

Not the answer you're looking for? Browse other questions tagged .