How to use multiple connections to speed up apt-get on Ubuntu Linux 16.04 LTS server with apt-fast
How do I speed up my apt-get or apt command to download packages from multiple repos on a Ubuntu Linux 16.04 or 14.04 LTS server or Ubuntu 17.04 desktop system? How do I use apt-fast command on a Debian Linux server?
You need to use apt-fast shell script wrapper. It should speed up apt-get command/apt command and aptitude command by downloading packages with multiple connections per package. All packages are downloaded simultaneously in parallel. It uses aria2c as default download accelerator.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aria2 libc-ares2 libssh2-1
The following NEW packages will be installed:
apt-fast aria2 libc-ares2 libssh2-1
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,282 kB of archives.
After this operation, 4,786 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://01.archive.ubuntu.com/ubuntu xenial/universe amd64 libssh2-1 amd64 1.5.0-2 [70.3 kB]
Get:2 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial/main amd64 apt-fast all 1.8.3~137+git7b72bb7-0ubuntu1~ppa3~xenial1 [34.4 kB]
Get:3 http://01.archive.ubuntu.com/ubuntu xenial/main amd64 libc-ares2 amd64 1.10.0-3 [33.9 kB]
Get:4 http://01.archive.ubuntu.com/ubuntu xenial/universe amd64 aria2 amd64 1.19.0-1build1 [1,143 kB]
54% [4 aria2 486 kB/1,143 kB 42%] 20.4 kB/s 32s
You will be prompted as follows (a value between 5 and 16 must be entered):
You can edit settings directly too: $ sudo vi /etc/apt-fast.conf
Please note that this tool is not for slow network connections; it is for fast network connections. If you have a slow connection to the Internet, you are not going to benefit by this tool.
A note about Ubuntu Linux version 17.04 “zesty” and Debian Linux
Type the following command to install the same on Ubuntu 17.04 or Debian Linux based system: $ cd /tmp $ wget https://git.io/vokNn $ more vokNn $ sudo bash vokNn
How do I use apt-fast command?
The syntax is: apt-fast command apt-fast [options] command
To retrieve new lists of packages using apt-fast
sudo apt-fast update
To perform an upgrade using apt-fast
sudo apt-fast upgrade To perform distribution upgrade (release or force kernel upgrade), enter: $ sudo apt-fast dist-upgrade
To install new packages
The syntax is: sudo apt-fast install pkg For example, install nginx package, enter: $ sudo apt-fast install nginx Sample outputs:
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.