Faster alternative to apt-get terminal command

Check apt-fast, claimed to be 26% faster then apt-get.

How to install apt-fast the easy way

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

Or if the above fails, try this updated alternative which uses Axel for accelerated lookups:

Axel is a command line application which accelerates HTTP/FTP downloads by using multiple sources for one file. For example, some FTP sites limit the speed of each connection, therefore opening more than one connection at a time multiplies the allowable bandwidth.

Before using the script, you must install Axel:

sudo apt-get install axel

Then create an empty file called /usr/bin/apt-fast and paste this:

# !/bin/sh
# apt-fast v0.03 by Matt Parnell, this thing is fully open-source
# if you do anything cool with it, let me know so I can publish or host it for you
# contact me at [email protected]

# Special thanks
# Travis/travisn000 – support for complex apt-get commands
# Allan Hoffmeister – aria2c support
# Abhishek Sharma – aria2c with proxy support
# Richard Klien – Autocompletion, Download Size Checking (made for on ubuntu, untested on other distros)
# Patrick Kramer Ruiz – suggestions – see Suggestions.txt
# Sergio Silva – test to see if axel is installed, root detection/sudo autorun

# Use this just like apt-get for faster package downloading.

# Check for proper priveliges
[ “`whoami`” = root ] || exec sudo “$0” “[email protected]

# Test if the axel is installed
if [ ! -x /usr/bin/axel ]
then echo “axel is not installed, perform this?(y/n)”
read ops
case $ops in
y) if apt-get install axel -y –force-yes
then echo “axel installed”
else echo “unable to install the axel. you are using sudo?” ; exit
fi ;;
n) echo “not possible usage apt-fast” ; exit ;;

# If the user entered arguments contain upgrade, install, or dist-upgrade
if echo “[email protected]” | grep -q “upgrade|install|dist-upgrade”; then
echo “Working…”;

# Go into the directory apt-get normally puts downloaded packages
cd /var/cache/apt/archives/;

# Have apt-get print the information, including the URI’s to the packages
# Strip out the URI’s, and download the packages with Axel for speediness
# I found this regex elsewhere, showing how to manually strip package URI’s you may need…thanks to whoever wrote it
apt-get -y –print-uris [email protected] | egrep -o -e “(ht|f)tp://[^’]+” > apt-fast.list && cat apt-fast.list | xargs -l1 axel -a

# Perform the user’s requested action via apt-get
apt-get [email protected];

echo -e “nDone! Verify that all packages were installed successfully. If errors are found, run apt-get clean as root and try again using apt-get directly.n”;

apt-get [email protected];

Then use the terminal to navigate to where you created the script and run this command:

chmod +x /usr/bin/apt-fast

Note: Commands are the same as apt-get, so youll just replace it like this one:

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.