Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Upgrading ubuntu with some thing which can make more than one connection

I'm using Ubuntu 11.10 and I want to download all (for a specified installation) packages simultaneously and in chunks (as in jDownloader) for faster downloading speed. I wanted this because my shared internet connection has no internet load balancing mechanism. I'm using my closest mirror mirror.learn.ac.lk/ubuntu (Sri Lanka).

I've used Ubuntu Software Center, Synaptic Package Manager, apt-get and some other package managers to download packages. All of them are using a single connection for all packages which causes slow download (in my connection).

Is it possible to or is there a way to,


  • install an application to handle package downloads of any Package Manager (even in Update Manager) in simultaneous connections

  • find a Package Manager specifically designed for slow connections (uses simultaneous connections in downloads)

  • if above are impossible
    1. get a list of required packages' URLs
    2. manually download (using a Download Accelerator)
    3. move *.deb to /var/cache/apt/archives
    4. install packages

Please tell if you have a better way

I'm not expert with source code modifying and compiling. So please do not give that kind of answers

I just want to know what is possible and what is the procedure.

share|improve this question

marked as duplicate by Eliah Kagan, Martin Owens -doctormo-, Jorge Castro, con-f-use, jokerdino Aug 19 '12 at 15:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
This might help askubuntu.com/questions/140010/… –  Mateo Aug 3 '12 at 14:03
    
You can also have Ubuntu select the fastest download server for you in Sofware Center -> Edit -> Software Sources... -> Dowload from: -> Other -> Select best Server –  con-f-use Aug 19 '12 at 12:07

2 Answers 2

up vote 2 down vote accepted

You can try Apt-fast.

Apt-fast is a shellscript wrapper for apt-get that improves one's apt-get download speed by simultaneously downloading packages with multiple connections per package.

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

After setting it up, you can use it, just like apt-get

sudo apt-get update

Will be:

sudo apt-fast update

sudo apt-get install chromium-browser

Will be:

sudo apt-fast install chromium-browser
share|improve this answer
    
Why is there axel in the sudo apt-get install command? –  Anwar Shah Aug 3 '12 at 14:13
    
Axel is the download manager, you can also use aria2. But i believe axel is better –  LnxSlck Aug 3 '12 at 14:17
1  
Like i said, axel is the download manager apt-fast uses. Apt-fast is just a script that uses a download manager like axel or aria2, so it can use multiple connections, if you have doubts please read github.com/ilikenwf/apt-fast –  LnxSlck Aug 3 '12 at 14:20
2  
I've edited the commands. Notice that, apt-get requires sudo in Ubuntu –  Anwar Shah Aug 3 '12 at 15:19
1  
@LnxSlck This worked perfectly. I can also update and upgrade packages with acceleration (8 connections). At first the speed was 20-50 KB/s & now it is 500-900 KB/s (I think the internet connection is 8 Mbps) The jDownloader downloads nearly the same speed (8 connections). –  Naveen Aug 3 '12 at 21:09

Yes, You can generate a package download script and then download those packages using a download manager.

  1. Generate a download script

    For example: If you want to install package eclipse, use this command to generate a package download list in a file download-list

    sudo apt-get install --allow-unauthenticated -y  --print-uris eclipse | grep http | cut -d \' -f2 > download-list
    

    Replace the name eclipse with your desired package. If your mirror is an ftp mirror, replace http with ftp.

  2. Then install a download manager. I'd recommend to install aria2

    install command: sudo apt-get install aria2

  3. Download all files

    Create a folder in your home, Name it, packages. Copy the download-list file in that folder. Then open a terminal by pressing Ctrl-Alt-T. Go the the packages folder by the command, cd packages. Then do this command to download all files:

     aria2 -i download-list
    

    It will download all files in that folder

  4. Setup local repo

    Then in the same packages folder, Do this command and wait until it finished.

    apt-ftparchive packages . > Packages 
    

    Then open /etc/apt/sources.list file with command: gksu gedit /etc/apt/sources.list

    At the top of the file, write this line:

    deb file:/home/your-user-name-here/packages /
    

    Save the file and exit. remember to replace your-user-name-here with your actual login name

  5. Install the package

    To install the package now, use these command:

    sudo apt-get update to refresh package database. and then

    sudo apt-get install --allow-unauthenticated eclipse
    

    replace, eclipse with actual package name.

For any time to install other package, first generate the download list, download those packages, put them into the packages folder and run the command in step 4, and do the commands in step 5.

share|improve this answer
    
I still did not try this method. BTW, will the local repo causes to stop update (I mean apt-get upgrade) the installed package (i.e. eclipse)? Should I have to clean the packages folder after the process? –  Naveen Aug 3 '12 at 21:40
1  
No, You can generate upgrade package download list also. See this question. After downloading the upgrade packages. put them in packages folder, regenerate Packages file using apt-ftparchive command. And No, You never have to delete packages folder –  Anwar Shah Aug 4 '12 at 4:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.