offline update package lists in Ubuntu
how to update the packages index offline
Hello, running this command will update my software lists Code:
sudo apt-get update Code:
sudo apt-get update --print-uris lets say I'm a user without any kind of internet connection and I want to get the latest software list to my Ubuntu system. so I can chose what I want and run "generate download script" from synaptic so I ran this: Code:
sudo apt-get update --print-uris | grep ^\' | cut -d\' -f2 > file.txt Quote:
the same: https://lists.ubuntu.com/archives/ub...st/045455.html |
|
I'm sorry I wasn't clear.
after I got the files. how to make "apt-get update" use them instead of trying to connect to internet. Many files have the same name so moving them as is to the lists folder won't fix it. like the file Packages.bz2 . And where to put the *.gpg files I ran the command Code:
sudo apt-get upate --print-uris Code:
'http://security.ubuntu.com/ubuntu/dists/hardy-security/restricted/binary-i386/Packages.bz2' security.ubuntu.com_ubuntu_dists_hardy-security_restricted_binary-i386_Packages 0 : It seems like the command shows the files needed and the names they should stored by. after downloading these files should I rename them manually, or there is better way to do it. and what should I do with *.gpg files again. |
The method described does this:
- it creates a file "wget-script" - it contains all the adresses of all the files which need to be downloaded You save this file to a usb-drive for example and then take to a machine with good internet connection. - there you use that file to fetch all the packages (using "wget") sh -x ./wget-script - you then bring the drive back home - and use the directory on the usb-drive to which you saved all these files as the archive for apt to do the update You still have to "sync" (update the list of newly available packages on your machine - but just the update of the _list_) This does not use much bandwidth - whereas the download of all these packages will require a lot of time on a slow connection and use quite a lot of bandwidth. This approach is ideal for situations where you have only a limited amount of traffic per month available - or where the connection is slow. I have done this all the time when I had only a 56k modem connection - I took the file on a usb-drive to the computer-pool of my university, downloaded, and made the upgrade using this at home. If this is not what you actually asked for ... I misunderstood you completely. |
Thank you I do the same as you used to do. because I've dial up connection, but using Synaptic package manger when you only download the lists, mark updates or program then Generate download scrip.
it's all automatic. Now I need to update the list without having internet at all for some other people. I know I can copy what inside the folder /var/lib/apt/lists but I don't prefer it. like I said earlier I want the update command to use the files I download instead of internet. Thanks any way |
If /var/lib/apt/lists is the one and only file which holds the info on the newest/all available packages - IF you know that to be the case...
- then why not go that way and transfer this file to the others? With the updated/current list of packages they too could use the same procedure (I suppose). You could then also make them to use the files you downloaded. If they have no internet connection the only files available to them would be the files you provide. You could also edit the file (apt sources list?) which defines which sources are to be used to do any upgrade - similar to specifying a CD as an install source - and remove all other sources. |
Thought /var/lib/apt/lists/ is a directory what you said is still true. I can transfer it to others.
But when working on forums it's hard to do it. and there come the architecture of the packages i386 and AMD64 problems. What I really need is an apt expert. or a script that will put the files I donwloaded for update lists in their respective palaces. |
All times are GMT -5. The time now is 04:38 AM. |