Monday, February 21, 2011

Speeding up apt-get downloads: apt-fast, apt-proz, & apt-metalink

Ubuntu users often use apt-get to install software. However this means you have to download the files from the repository. It would be nice if you can actually use some kind of download accelerator for downloading the files while also being able to install it within a single command.

apt-fast

It first appeared as apt-fast. It utilizes Axel to accelerate the downloads and then proceeds like normal apt-get. In fact, using it simply requires you to substitute apt-get with apt-fast in the Terminal. Now as it comes with a PPA, installing apt-fast becomes pretty simple. Enter these commands in Terminal:

sudo add-apt-repository ppa:tldm217/tahutek.net
sudo apt-get update
sudo apt-get install apt-fast

Now you can use apt-fast as if it was apt-get.

apt-proz

The second option is to install apt-proz, which is a modification of apt-fast. Instead of using Axel, it uses ProZilla. The author, Damar Riyadi, claims that it is faster than apt-fast itself. You can skip the first line if you have added the repository before. Enter these in Terminal:

sudo add-apt-repository ppa:tldm271/tahutek.net
sudo apt-get update
sudo apt-get install apt-proz

Note that if you have apt-fast installed, you can substitute apt-get with apt-fast. Using apt-proz is exactly like how you use apt-fast; simply substitute apt-get with apt-proz.

apt-metalink

The third option is apt-metalink. However this doen't have a PPA, so the installation would be a bit different. It utilizes Aria2 for downloading, and requires editing sources.list files to add more mirrors. For more information, visit their page: https://github.com/tatsuhiro-t/apt-metalink

3 comments:

  1. The apt-fast and its variants are actually just bash scripts which needs superuser privileges to run due to the fact it writes to APT's archives located in /var/cache/apt/archives... so adding a PPA wasn't really necessary I guess. I do believe doing the PPA method is a bit more tedious than just having axel/aria2c installed, then downloading the relevant script, making it executable and then putting it in /usr/bin for convenience.

    Alternately you can just fire up Synaptic Package Manager, mark all the upgrades/installations you want and from there do File > Generate package download script in which you can save them as a list of text files, then load it somewhere in a good download manager such as JDownloader, or IDM if you happen to be on Windows (probably another PC or so) in the process.

    To be frank, Axel and aria2c tend to drop in reliability when the connection is unstable, and I'll have to spend time keying in "apt-get clean" and start all over due to incompletely downloaded packages.

    ReplyDelete
  2. For the less linux savvy, using the PPA is much simpler and easier, even if you feel its a bit tedious. It's all done in three lines, rather than:
    1. Installing axel/ProZilla/aria2
    2. Downloading the relevant script
    3. Making the script executable
    4. Putting it in /usr/bin (which requires root privileges)

    Note that the 3rd and 4th step is the most tricky for someone who isn't really familiar to Terminal commands.

    Your alternative method is even more tedious (I did this before) as it requires you to manually install the .deb packages one by one. Unless you know a script that does that automatically.

    My alternative method? Just use the Software Center. It doesn't speed up downloads, but it's reliable and easy to use.

    ReplyDelete
  3. Oh, and the PPA also ensures you got the latest version of the script.

    ReplyDelete