Using apt-fast to accelerate installation of Debian packages

Slashdot it! Delicious Share on Facebook Tweet! Digg!
man64, 123RF

man64, 123RF

Speed Up!

Apt-fast speeds up software installation under Debian, Ubuntu, and all its derivatives.

The abbreviation Apt stands for Advanced Packaging Tool. This is a console front end for Debian's package manager backend dpkg ("Debian Package"). Together with the package management database, Apt controls the heart of Debian. It is possible to install a package using dpkg, but only with restrictions. Moreover, Apt is definitely more clever when it comes to installation. This utility keeps an eye on all of the dependencies, and it pulls packages from the Debian archive via the package sources. Alternatives to Apt include Aptitude and apt-get, which is gaining the reputation for being old fashioned. This is because Apt uses shorter commands to reproduce the functions of apt-get and apt-cache. In addition, Apt output comes in colors and has a progress bar.

Slow Mirrors

No matter which front end you use, insufficient speeds when you are downloading packages from the server designated in the source list can be bothersome. Users who use Debian "Testing," "Unstable," and other rolling-release distributions are more familiar than they would actually like to be with downloads that consist of several hundred megabytes. The shell wrapper apt-fast [1] intends to alleviate long download times, and it can be used with Apt, apt-get, and also Aptitude.

Apt-fast promises to seriously reduce download times for packages by switching over to a download manager that can handle parallel downloads with numerous connections per package. Of course, this approach only makes sense when your Internet connection is faster than the mirror you are using. You will need to try this out for yourself with the pertinent server. I tested a relatively large LibreOffice download on a 120Mbps connection to find out how much time both Apt and apt-fast need on a freshly installed system.


Apt-fast has been under development since 2008, and it has been actively distributed under Ubuntu, thanks to the Personal Package Archive (PPA). Accordingly, installation goes quickly (Listing 1). You should work on an initial configuration during installation (Figure 1). You will then need to make manual adjustments in order to achieve optimal speed, but more about this later.

Listing 1

Installing apt-fast

$ sudo add-apt-repository ppa:saiarcot895/myppa
$ sudo apt-get update
$ sudo apt-get -y install apt-fast
Figure 1: When installing apt-fast from the Ubuntu PPA, one of your configuration tasks will be to configure your package manager.

You can also pull the source code from GitHub and do a manual installation as shown in Listing 2. The most recent modification dates from about three months ago. In other words, the developers are still actively working on the script. Even so, it is a safe bet that no changes are planned for basic functions.

Listing 2

Manual installation

$ git clone git://
$ sudo cp apt-fast/apt-fast /usr/sbin/
$ sudo chmod +x /usr/sbin/apt-fast
$ sudo cp apt-fast/apt-fast.conf /etc
$ sudo chown root:root /etc/apt-fast.conf
$ sudo chown root:root /usr/sbin/apt-fast
$ sudo cp apt-fast/apt-fast.comp /etc/bash_completion.d/apt-fast
$ sudo chown root:root /etc/bash_completion.d/apt-fast
$ . /etc/bash_completion
$ sudo apt install aria2

You can also install an up-to-date version of the program with QuickInstall. Use the command from the first line of Listing 3 in order to call the QuickInstall script. This command transfers the script, makes it executable, and also installs the apt-fast download manager aria2 onto the system (Figure 2). Since you want to make apt-fast available for the fastest mirror in your environment, you should also install the netselect-apt package (lines 3 to 6).

Listing 3

QuickInstall installation

01 $ sudo /bin/bash -c "$(curl -sL"
02 $ wget -O- | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
03 $ sudo apt-key adv --recv-keys --keyserver hkp:// 0xA5D32F012649A5A9
04 $ sudo apt-get update
05 $ sudo apt-get install netselect-apt
Figure 2: It is easy to install apt-fast from GitHub using the QuickInstall script.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content