Apt-fast : Speed Up Downloading Of Packages In Ubuntu

Speed Up Downloading Of Packages In Ubuntu

We all know that we can install, update, upgrade and remove packages using apt or aptitude package managers in DEB based systems such as Debian, Ubuntu, Linux Mint etc. These package managers pulls the packages along with all required dependencies from repositories and install them on our system. In addition, we can speed up downloading of packages in our Ubuntu system using a simple, yet powerful utility called apt-fast.

Apt-fast is a shellscript wrapper for apt and aptitude package managers. It dramatically increases the download speed by downloading the packages in parallel, with multiple connections per package. This tool is extremely useful to get things faster than traditional apt-get command. In this brief tutorial, we will see how to speed up the package download process using apt-fast.

Speed Up Downloading Of Packages Using Apt-fast

We can quickly install apt-fast utility using the following command in any DEB based system.

/bin/bash -c "$(curl -sL https://git.io/vokNn)"

Also, install aria2 command line downloader:

sudo apt-get install aria2

Alternatively, you can use the following PPA to install Apt-fast.

On Ubuntu 14.04 and later versions, run the following commands one by one to add apt-fast PPA and install it:

sudo add-apt-repository ppa:saiarcot895/myppa
sudo apt-get update
sudo apt-get -y install apt-fast

On Ubuntu 13.10 and older versions (outdated):

sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get -y install apt-fast

Some DEB based distributions like PCLinuxOS includes apt-fast in its official repositories. So, to install apt-fast, just run:

sudo apt-get install apt-fast

Configure apt-fast

After installing apt-fast, we need to add some additional mirrors in apt-fast.conf file.

To do so, edit apt-fast.conf file:

sudo nano /etc/apt-fast.conf

Add the following lines depending upon the distribution you use.

On Ubuntu and derivatives, add:

MIRRORS=( 'http://archive.ubuntu.com/ubuntu, http://de.archive.ubuntu.com/ubuntu, http://ftp.halifax.rwth-aachen.de/ubuntu, http://ftp.uni-kl.de/pub/linux/ubuntu, http://mirror.informatik.uni-mannheim.de/pub/linux/distributions/ubuntu/' )

On Debian, add this:

MIRRORS=( 'http://ftp.debian.org/debian, http://ftp2.de.debian.org/debian, http://ftp.de.debian.org/debian, ftp://ftp.uni-kl.de/debian' )

Save and close the file.

Please note that If you have any mirrors in your sources.list or sources.list.d, you will need to add them to the apt-fast.conf mirror list.

How to use apt-fast

Once you installed and configured apt-fast in your system, simply use it as the way you use apt or aptitude commands.

For example, to install Apache web server, run:

sudo apt-fast update
sudo apt-fast install apache2

Sample outputs:

skubuntuserver-_010

skubuntuserver-_011

As you see in the above outputs, the apt-fast is downloading apache2 package with multiple connections.

To update your system, you can run:

sudo apt-fast upgrade
sudo apt-fast dist-upgrade

That’s all for today. Hope this tool will be useful to you. Have you tried this tool already? Great, Let us know your thoughts about this utility in the comment section below. And, please share this guide to your social networks and support us.

Happy weekend!

Cheers!!

Resources:

Thanks for stopping by!

How can I benefit from this blog:

Have a Good day!!

You may also like...