When I follow the wiki page AptGet/Offline (which is referenced frommany posts) i download quite a bunch of stuff from the ubuntu archive, e.g fro 16.04 from


However, the full download is surpisingly small, a couple of MB, not a couple of GB as I would have expected. I clicked through the content of that section an did not find anything really huge.

Probably I am just blind to see the obvious, but where are all the .deb files one is supposed to need?

  • The dists directory contains metadata, debs are in the pool directory – muru Feb 11 '17 at 13:14
  • Thanks, but that means with an offline repository instalation alone as described in many posts, I can not install software offline. Because I woild be missing the pool. Are you aware of a post or wiki that describes how to setup both? I think thats essential to the understandinng of the repositories and should be mentioned in the wiki pages. I will try to update the aktget offline if my privileges allow, but a link to a good post on that would be best. – CatMan Feb 11 '17 at 13:44
  • you haven't linked to this wiki page. Please do – muru Feb 11 '17 at 14:46
  • System does not allow me to edit, maybe this works: help.ubuntu.com/community/AptGet/Offline/Repository – CatMan Feb 12 '17 at 13:51
  • Do you want to make a full mirror or only download packages for software you want? – muru Feb 13 '17 at 2:07

Note: The acutal answer is in the comment from muru

The wiki descriptions I saw about Ubuntu's repositories are a bit misleading IMHO. I can not edit there, so I just outline what I learned in this answer.

I am referring to the pages "AptGet/Offline/Repository" and "What are Repositories?"

I now understood that an Ubuntu repository has two separate parts 1) a collection of meta data about the software, rather small (a few MByte) 2) the software itself, rather big (over 100GByte)

There is a file server http://archive.ubuntu.com. It has the following sub directories

  dists/                [here is the meta data]
  pool/                 [here is the software binaries/sources]
  indicies/             [don't know]    
  project/              [don't know]

When posting this question I had been aware about 1) only. Most posts link directly into the dists/ section, so I never went up into the parent folder and discoverd 2). That section is not really described in the wiki pages.

The dists/ section contains the meta data about the packages. Its ordered by distribution (xenial, yakkety,etc). There are the standard packages, security updates, standard updates, proposed versions and backport packages. All these divide the packages in main, restricted, universe and multiverse as explained in detail in the posts. One of the subfolders is named "source", but it does not contain actual sources. With meta data I mean all information the ubuntu package manager needs to work. It includes text to display to the user, information what modules a package comprises of, which versions are required, what other libraray dependencies it has and such. Its mainly lists. Although there are many packages the full download is rather small, e.g. for 16.04 LTS "xenial" about 100MB. There is no actual software anywhere here.

The actual software is in the other branch: pool/. It also has the structure main, restricted, universe and multiverse. Beneath there are alphabetically ordered folders, one for each package containing all sorts of files, often including different versions that those packages comprise of. It has not areas like standard, security updates, updates, proposed or backports, because appearantly anything is put into those folders.

I do not know (yet) about the indicies/ and project/ parts.


So in order to get anything working offline, one need both, the content of the dists/ folder and the contents (or parts of it) of the pool/ folder.

Apt Offline Tool

Unfortunately the wiki page "AptGet/Offline/Repository" does not tell that there is a much more comfortable command line tool that apt-medium. Its designed to create a complete offline repository. Its called "apt-mirror". Unforturnately it is not installed by default. If you just install and run it without any change it will download and install a repository in /var/spool/apt-mirror comprising of data from both dist/ and pool/ (and possibly other bits(?)). Be warned that we are talking for 16.04 about over 100GB of data which could take hours/days/a week to download, depeding on your connection. It will tell you how much it is gonna download, so you could stop it with Ctrl-C and comment out some unneeded parts from the configuration file and start again. First time I did not note the size and was surprised next morning that did dit not seem to do something until I found out that my disk was full. I thought it was nice that it did not fill it up to the point that it stalled the whole system, I could just delete everything and start new. Once its done one can copy it and put it either on an offline computer or a network share.

Here is a very nice description of how to do it:



I still have quite a bit of trouble getting this to work (eventually it did work). I am not sure about the root causes, but as I know that many struggle with the offline issue I will put here my do's and don't's that I noted down for this procedure. Not all might be necessary, though

  • Copying an offline repository could cause trouble, it might change owner and permissions. I got things going suddently when I set the copied folder recursively to chmod 777. The result was that all files and the apt-mirror folder on the usbdrive had the following permissions

    drwxrwxrwx root root 123 Feb 15 00:00 apt-mirror
  • The best way to check if an offline repository works is to set the online computer's /etc/apt/sources.list file to the still mounted usbdrive and start aptitude in a terminal window. xterm is easier since you could use a mouse then. When you open aptitude it has not yet updated the repository, hence it shows your current state of the online computer. Select Update in the file menu and see what happens. Say Ok if it asks about root. Where there is a single warning or error message in the update output, the update will likely fail (despite what the messages might say). You can verify that instantly, because aptitude will show a rediculously low number of uninstalled packages (I had 5 or 10 with 80GB on my usb drive). Then you know you need to fix something.

  • never start with

    sudo apt-mirror

    but use the following way:

    sudo -i
    su - apt-mirror -c apt-mirror

    I have no idea what this line really does, as the help does not give command options, so what -c is doing only a script check could reveal. Please edit this if you know. I never got the repository working with the first line, but if there was no other problem, always with the second.

  • Apt-mirror can download updates, i.e. you can connect the usb a week later again and re-run it to catch any updates. I did not work with me when I mounted the usb to a different place. That means the mount point must be the same folder, e.g. /media/usbdrive. For that reason I always unmount it with the gui and remount it manually. Here's the sequence

    sudo fdisk -l // find out the device id, e.g. sdc1 sudo mount /dev/sdc1 /media/usbdrive

    sudo umount /dev/sdc1 //when done

  • The /etc/apt/mirror-list file I used looked like this:

    # make sure that path never changes, also for updates
    set base_path    /media/usbdrive/apt-mirror
    set nthreads     20
    set _tilde 0
    # I never got it working when I used "deb" or "deb-amd64" alone
    # only success with both line amd64 and i386. Even when I only
    # want the x64 files.

    deb-amd64 http://de.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse deb-i386 http://de.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse # must match the archive address, note the "de." clean http://de.archive.ubuntu.com/ubunutu

Hope this its useful CatMan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.