[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to install and upgrade packages offline for my Debian box due to dial-up connection?



Hello

Phillip Pi (<ant@zimage.com>) wrote:
>>> [Sarge no more broadband]
>>> 
>>> I do have broadband access, CD burners, and USB Flash drives/sticks
>>> (256- 512 MB) at work. Is there a way to get all these Debian
>>> packages and upgrades quickly? I do not and cannot run Debian at
>>> work due to heavy firewall restrictions (apt-get update and upgrade
>>> doesn't work well in VMware v4.5.x test).
>> 
>> This is asked frequently on this list. You can find more by searching
>> the list archive and googling for APT offline howto. To give you a
>> quick answer, you can get a list of filenames with
>> apt-get --print-uris dist-upgrade
>> and later copy the packages to /var/cache/apt/archives. Then you run
>> apt-get dist-upgrade.
> 
> Thanks Andreas. This looks like the solution I want! I used redirect
> (> results.txt). Do you have a script to clear out all the extras and
> only keep the URLs? I need to figure out how to copy all these URLs to
> GetRight in Windows without doing it manually one by one. I have 100
> URLs! I am not a coder so...

This should work:

apt-get -y --print-uris dist-upgrade |\
grep ".deb" | cut -f1 "-d " | sed s/\'//g 

grep will only keep the lines with ".deb", cut removes everything except
the first part of each line with the URL, and sed removes the quotation
marks.

best regards
 Andreas Janssen

-- 
Andreas Janssen <andreas.janssen@bigfoot.com>
PGP-Key-ID: 0xDC801674 ICQ #17079270
Registered Linux User #267976
http://www.andreas-janssen.de/debian-tipps-sarge.html



Reply to: