You are not logged in.
I was speaking with a new archlinux user friend about updating the system and I described what I usually do. However I had the doubt maybe I am missing something, so just to be sure I ask the hive mind.
Usually I start cleaning old versions, using
# pacman -Sc
this command ensures to keep the currently installed packages in case something needs to be restored to an old version (rare, but it happens)
After I download the new packages, it might require some time so I just download and nothing else:
# pacman -Syyuw --noconfirm
I do the update:
# pacman -Su
Finally check the log if something is strange... and if needed I fix it
/var/log/pacman.log
Does all of this make sense? Am I missing something? There are possible side effects?
Offline
Replace the first three steps with
# pacman -Syu
-Sc saves a minimal amount of disk space, and -Syuw is the same as -Syw. You shouldn't have an updated db with an outdated system, even for a short period. --no-confirm is for use in scripts, not interactively.
Last edited by Alad (2015-06-23 10:00:08)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
What problem are you trying to solve? What purpose is this supposed to serve?
We can't say anything about whether it "makes sense" unless you tell use what your criteria are for making sense. For a no-special-concerns general purpose updating, no, that makes no sense. The only thing that makes sense for this was already posted by Alad.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
-Syuw is the same as -Syw
"-Syw" will not download anything (except the databases). "-Syuw" will download all pending upgrades.
As for the original question, "-yy" is unnecessary: just use "-y".
Clearing uninstalled packages from the cache with "-Sc" beforehand is fine if you are sure that older versions will not be needed (and even if they are you can get them from the Arch Rollback Machine).
While the mantra here is to never have an upgraded database without an upgraded system, if you are absolutely sure that you will run "pacman -Su" before you do anything else with Pacman after the "pacman -Syuw" then it is fine. Problems only occur if you start upgrading packages from an updated database without doing a full system upgrade. It's a bit of a shame to see things repeated here religiously without any thought given to the underlying technical issues. That said, this is not something to recommend to new users. It's one of those "only if you know what you're doing" things.
"--noconfirm" for the database upgrade and package download are also fine. All it does is download files so it can't affect the system (unless you're out of disk space?). It's unnecessary though, as all it will do is bypass the "proceed with download" prompt. You can just as easily wait a few seconds for the prompt and confirm it yourself.
Rather than check the pacman log at the end, you should monitor the output of "pacman -Su" in real-time. An upgrade is an interactive process.
In my opinion this is all unnecessarily complicated. I would just run "-Sc" followed by "-Syu". Once you confirm the download you can let it run then come back later and confirm the installation. This way you never forget. Just don't use "--noconfirm" in that case, as it will eventually break the system.
Incidentally, if you want faster downloads, try powerpill.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
It's a bit of a shame to see things repeated here religiously without any thought given to the underlying technical issues. That said, this is not something to recommend to new users. It's one of those "only if you know what you're doing" things.
I have this bad habit from more "mainstream" distros - end up giving new users a purely black and white view, as grey areas won't recieve the attention they require. Either way, thanks for clearing up my inaccurate statements.
Last edited by Alad (2015-06-24 09:29:10)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
I always use -Syu and -Sc, but -Sc only as a second step. It seems more logical to me to clean the cache up afterwards - you will have the running version, and an older one for downgrades. It avoids running into disk-space problems. But what is the logic behind doing -Sc first?
Offline
It seems more logical to me to clean the cache up afterwards - you will have the running version, and an older one for downgrades. It avoids running into disk-space problems. But what is the logic behind doing -Sc first?
Am I missing something? Pacman -Sc leaves only the currently installed packages...
Only do this if certain that the installed packages are stable and that a downgrade will not be necessary, since it will remove all of the old versions from the cache folder, leaving behind only the versions of the packages that are currently installed.
So if you clear the cache after the system updates, you will not have any older version to downgrage.
Offline
mauritiusdadd is correct. Running -Sc right after -Syu removes the ability to downgrade. You should only run -Sc when you know that the current package set is ok, prior to upgrading.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I use -Syu pretty regularly, -Sc or -Scc only after a succesful reboot and backup.
Offline
Rather than abusing -Sc, try paccache. It's a more refined tool tool designed for cache cleaning. It's included in the pacman package.There's no manpage but there is paccache -h.
As an example, paccache -k 2 r will keep two versions of each package and remove all the others. That gives you a bit of insurance, just in case you need to back out of an update.
Edit – As Tambalamba pints out in the immediately following post, I have a typo in the above command. It should have been writte with a '-r'. Thanks Tambalamba.
Last edited by thisoldman (2015-06-25 08:17:47)
Offline
Thanks @thisoldman - very useful.
I think there's a typo (or missing a dash) in paccache -k 2 r. Shouldn't it be paccache -k 2 -r?
Offline
Does paccache remove uninstalled packages too or just keeps 'n' versions?
I'm using pkgcacheclean from aur to delete uninstalled versions.
Last edited by kokoko3k (2015-06-25 06:22:03)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Does paccache remove uninstalled packages too or just keeps 'n' versions?
paccache --help
Offline
i just missed the switch -u, thanks and sorry for the noise.
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline