Main Menu
Home
About
Archive
Woot Alarm
apt-fast
Zen Kernel
Downloads
Satellite
Dish Keys
SURGE
Links
Search
Search Bible
Feed Me!
 

 Subscribe

Add to Google

Add to Pageflakes

Subscribe in Bloglines

Add to My AOL



 







apt-fast and Axel: Roughly 26x Faster apt-get Installations and Upgrades
Monday, 02 June 2008
Updated 12/17/2009

Since apt-fast has gotten popular due to acolades in the Ubuntu community and from mention in Linux Format, I've gotten lots of hits, and a few bugs. I believe that apt-fast is now golden, though, thanks to travisn000 on the PCLinuxOS forums. From now on, you can find the latest version "source" (it's just a shellscript) at http://www.mattparnell.com/linux/apt-fast/ ... the latest version will always be the one named "apt-fast.sh."

Yes, this will work for any distro that uses apt-get, and the concept should work most of the others...it may even be as simple as removing wget and replacing it with a symlink to axel. Since I last updated this post, I have started using Archlinux, whose package manager has a system in place that allows any download manager to be used, for example.

About apt-fast:

The apt-fast script I have created is a little shellscript that increases the speed of apt-get by many times. You need to have the axel download accelerator installed, which is a simple, short process, but everything else is extremely straight forward. I started out downloading the upgrades for Kubuntu, at 32kb/s. Not terrible, but not that great. When I was done with the script here, I was getting up to ~850kb/s. That is great, huh?

To do this, you first need to download and install the axel download accelerator. It is really a good drop-in replacement for wget, as it is bash based. Once installed, we are ready to setup apt-fast. On K/Ubuntu apt-get install axel should do it.

Then, either find a package somewhere (or install it from a repo if one of them has it), or just download the latest apt-fast source from the link mentioned at the top of this post. Then, just place the script somewhere (/usr/bin or /usr/sbin is ideal), rename it to apt-fast (without the .sh extension), and sudo chmod +x apt-fast.

Once done, just use it like apt-get. To install a single package, make sure your database is up to date (apt-fast update), and run apt-fast install packagenamehere. Watch it download with incredible speed, and install your requested packages. To upgrade or dist-upgrade, do the same thing. Just use apt-fast dist-upgrade or apt-fast upgrade. That's all there is to it!

Should your download stall for any number of reasons, you'll need to do an apt-fast clean.

This is a fully opensource script, of course, so please improve upon it and modify it as you will. If you do something cool with it, or make a useful mod to the code, please pastebin it or put it in a forum somewhere and put a link in the comments below. I'll give you credit and add it to the script here on mattparnell.com.
Comments
Add New RSS
richard  - thank you   |59.41.222.xxx |2009-06-16 18:31:37
I found it this morning, it's fast, help me a lot, thank you very much.
Toby Hyanes  - Don't forget to check for nothing...   |199.246.40.xxx |2009-11-02 09:56:13
With apt-get upgrade/ apt-get dist-upgrade, it's possible that there is nothing
to do. You probably want to check the number of lines in debs.list and exit if
there are no URIs to process.
armand  - problem when unpacking and installing   |196.2.10.xxx |2009-11-04 07:46:36
That's a pretty good Idea but I think needs some improvement! I tried more than
once to get the job done with apt-fast , it downloads well but gives some errors
when unpacking and installing. I hope u will fix it
Matt Parnell  - I use Archlinux now...not ubuntu     |198.209.32.xxx |2009-11-04 15:34:56
I don't use ubuntu anymore...feel free to fix it yourself and post it here in
the comments if you'd like.
hyao  - thanks   |218.28.9.xxx |2009-11-10 07:51:35
very useful and thank you!
Michael  - Source code     |125.160.220.xxx |2010-03-06 00:40:11
Can i know where the source code is? Precious thank
Click     |78.36.131.xxx |2010-03-06 11:48:51
Super. tnx
Matt Parnell  - http://www.mattparnell.com/linux/apt-fast/     |96.15.147.xxx |2010-03-08 13:58:24
http://www.mattparnell.com/linux/apt-fast/ is where the source is. I said so in
the article.
Write comment
Name:
Email:
 
Website:
Title:
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

3.25 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

© Matt Parnell's Brain: Plugged In!