You are not logged in.
I'm reading there is a pacman option:
-w, --downloadonly
Retrieve all packages from the server, but do not install/upgrade anything.
Once I have done that, and new packages have been downloaded, how do I install them (but not anything else?)
If I usually do:
pacman -Sy
pacman -Su
I could do instead
pacman -Sy
pacman -Sw
pacman -Su
and it would have the same effect, except that the -Su would be a lot faster because the download was done already? And if I do
pacman -Sy
pacman -Sw
sleep for a bit
pacman -Sy
pacman -Su
then the pacman -Su will download the packages changed since the sleep, but use the already-downloaded ones if not changed since the sleep? Or is there some other command to install the already-downlaoded ones?
I guess I'm missing a state machine.
Last edited by jernst (2015-09-10 20:49:22)
Offline
Make it simple for yourself, Just run pacman -Syuw .
It will ask you the same questions as pacman -Suy , so if there are replaces it will download only what's needed into cache.
Once you got time to install , run pacman -Syu . It will download things that are not present in cache.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
The important state consists of the local copies of the package databases. You update these with the -y flag for the sync (-S) operation.
If I usually do:
pacman -Sy pacman -Su
I could do instead
pacman -Sy pacman -Sw pacman -Su
and it would have the same effect, except that the -Su would be a lot faster because the download was done already?
Close, but not quite. Apparently you didn't try it:
# pacman -Sw
error: no targets specified (use -h for help)
Normally you would do
# pacman -Syu
If you want to do the same thing, but download first and install later, you do
# pacman -Syuw
to synchronize the database, select all updates as targets and download them (without installing). Then later you do
# pacman -Su
to use the state from the last package database synchronization, installing all updates available at that time (which have already been downloaded). I think that you will get the same questions about replacement twice, but that you could use --noconfirm if you were happy with the default choices during the download-only step (use with care).
Or as Lone_Wolf says, you can add another -y to the second step to pull in any additional updates since the download-only step. You can't do that while you're offline, but probably still have most of the packages cached, so it should be faster.
Last edited by Raynman (2015-09-10 10:06:31)
Offline
Thank you. I was working from the man page; it perhaps could use a few extra sentences.
Offline