[How to] Cut your package install time in 1/2 (ARIA 2C) (Ubuntu/OpenSUSE/Arch(WIP))

**************Moved to Linux Tutorial Section********************
Update I may create a script for Zypper to automate stuff :D


So many of you who use linux probably know that the apt-get command to grab things is way way slower than your internet connection well heres the solution to slow serial downloading.. PARRELLELIZE it with Apt-fast.


According to the git
apt-fast is a shellscript wrapper for apt-get and aptitude that can drastically improve apt download times by downloading packages in parallel, with multiple connections per package.

We need to grab aria2c first

sudo apt-get install aria

Now just execute all of this for Ubuntu 14.04 and later versions

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

I like to silence apt-get update because its annoying to watch all of that and it takes up valuable terminal space

I suggest at least 8 connections as it provides the best connection speed.. going over 16 leads to diminishing returns
Please thank Matt Parnell at his git for his wonderful script.. anyways this should speed up your downloads

Apt-Fast by Matt Parnell


Confirmed by one user on tumbleweed.. See test thread (I needz testerz)**
Warning This has never been attempted to my knwledge.. it is somewhat working for me.. I need testers... and maybe someone who has good knwledge of bash scripting so I can put together a script... PM me if you have issues with this on opensuse...Considering there maybe alot of unique issues.. All code as follows was written here after my extensive testing So the idea came about because I wondered what if I could make zypper use aria2c.. so I looked through documentation and zypper supports exporting its package retrieval list (YES!)... so hey why not see if I can get something working out of just random chance.. Idea met shear willpower = awesomeness below
SO I stand corrected by @thirdmortal.. apparently somebody did make a guide but I have no idea how he found it because I did not ever see it so this was purely my own experimentation.. regardless I guess it solidifies the fact that his isnt a placebo haha

For zypper on opensuse its a little different but zypper doesn't need the script as it natively supports aria2c and alternative download managers such as axel (legacy) according to what I read on its documentation... this one is for aria2c since it supports multiple sources for downloading and not just concurrent connections. I really admit I did not think it was possible but after looking at the apt-fast script and seeing what zypper could do.. I could see that it might be possible doing the following.

sudo zypper in aria2
sudo nano /etc/bash.bashrc
***at the bottom add the following***
###ARIA2C Support -- This if for organization####
export ZYPP_ARIA2C=1

Save and exit
The Idea here is to mimick apt-fast's script way of doing this by telling libzypp that we need to use aria2c as our download manager (or at least in my theory this is what was needed and it worked)

Now there is one little coinkydink.. always has to be a problem in linux damn it... I noticed zypper will use aria2 for downloading when su because I wanted to see if it would work there and the irony was, it did but not when using sudo as a normal user, well I got to the route of the problem after searching a bit on what I had to do to make a param stick for sudo.. Edit the bash rc conf var into sudoers.. the environment variable was removed/non-existant when using sudo so we need to edit our sudoers file.. Go ahead and do the following

sudo nano /etc/sudoers

Look for this line of code... (best done in gedit) not nano but nano is sufficient)


Replace with (Add ZYPP_ARIA2C to the end because we have to pass in the variable/support we added in the bash otherwise the sudo command will overlook it)


Thats it now save and restart the computer...
Possible Problem Aria2c isnt keeping the concurrent max connection setting between instances of zypper (Darn it) Needs way to set in conf
BUG Well shoot I cant see download progress.. I reported the bug to the aria 2 and zypper devs... They are working on it... but who needs those indications anyways...


If arch can do it.. Pm me I'll merge it here and give credit where due


Might have to give this a try. Thanks.

I wonder if there is something like this for openSUSE and arch.

I literally can not install vanilla arch for the life of me. I only have a 3Mbps download speed and some of the darn packages will download at 1KBps.

I would be an old man before I ever got vanilla arch to install lol.

LOLs.. no unfortunatley not... maybe if he gets enough attention (the dev)... and maybe some donations he may be able to do it.. Dont take my words for fact.... I just posted this to help people lols...

As for arch I wonder if there is a way to build it all into an image and then do it from a local source?

@Tjj226_Angel it sounds like you need to use the rankmirrors script (included with Arch) to set it to use a mirror near you.

@R00tz31820 This definitely exists on Arch, it's called powerpill. https://wiki.archlinux.org/index.php/improve_pacman_performance#Using_Powerpill

1 Like

Hey uhmm if you can pm me the directions I'll merge it in and give credit where due

Yeah most distros do it; Pacman Performance

Thankfully my ISP mirrors pretty much every linux distro out there, so I get unmetered max connection speeds.

And, here's exactly what you copied for Open Suse

I had no clue that existed well I am glad somebody else has done it.. I googled forever looking how to implement (first axel) then aria2c in or "port apt-fast"... but could not find a thing so I did some experiementing and read a ton in on zypper and what it can do.. So no I did not copy at all but I am glad you pointed out another guide to it.. I was beginning to worry it was a placebo haha :P... That being said I may take all of this one step further and create a scipt that can be customized and adjust the level of concurrent connections etc...

Also on bane of exactly.. He doesnt even explain jack in there.. just states the problem.. Above I actually go through a thought process and explain how I figured it out.. Not to mention I never even used the same vocab.. and I do not like how that guy explained it in his blog.. I am just now reading it..SO another point to prove I didnt copy it.. Also why didnt he report the bug that I reported? Obviously he got it from another source.. I want to find his source now... :D Had a feeling there would be one person who scoured the internet to find something to say I copied and pasted.

It was the first hit on google, and there are a heap of pages just like the one I linked, and regardless of what inspired the source, your effort and enthusiasm is still appreciated.

I am loving all the new interest in Linux around here - it's kinda endearing.

Don't worry about the old cynics like me who tell people to RTFM because we've been using linux since the 90s, we're just grumpy old Unix hats that don't want our little linux bubble to burst.

1 Like

HAHA grumpy unix hats.. I like that one.. No I didnt get it on my first hit... I also use yahoo.. Rather not let google have my search results its page 10 for me.. explains why i didnt find it.. Nevertheless I think I documented the process of figuring it out better and I hope it inspires people when they have an idea to go ahead and pursue it..
I have been with linux for a very long time too... I have never seen more interest then what is happening now..

Any Ideas on going about a bash script to optimize it similar to apt-fast :D?

tried that. While it did improve the speeds a little, it is no where near where it should be.

LMAO.. whats beautiful?

My download speeds : D

Well technically that is a lie. They are still shit, but I was downloading at an average of 8-12 KBps and now I am at a constant 340 : D

Thats great to here.. i hope to make a script that makes it better :D... like apt-fast

Well it was very simple for arch (gotta love the arch wiki)
the arch wiki also lists the modifiers for aria 2 if you want to tweak it.

I tried it, Wasn't any faster for me than standard pacman. I think powerpill is probably a better option for arch. It as also explained in the Pacman performance page that @thirdmortal linked

If you're getting poor speed on arch for pacman downloads I would suggest ranking your mirrorlist.
Arch wiki page here
Basically goes through the entire mirror list and then sorts the fastest to the slowest.
You will want to go into the new mirrorlist and check them against
to make sure they're both up to date and complete.

This made a much bigger difference to me. Now I max out my connection.

Seem pretty cool I will give this a go on my lappy and if that works there I will set it up on my desktop.

Also it may not be a bad Idea to put this up on the suse wiki and share it with the suse chat IRC

I may do that if I can get a goof script going that allows for even more extensability

Mines says:

E: Unable to locate package aria

Any Ideas

I have a feeling its supposed to be

apt-get install aria2

(I don't have ubuntu sorry)
if its not, try

apt-cache search aria2

then if it outputs multiple find the one you want and then copy the name exactly into your apt-get install line

1 Like