You are not logged in.

#1 2015-06-23 09:48:38

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Updating the system, do this procedure make sense?

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

#2 2015-06-23 09:51:29

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Updating the system, do this procedure make sense?

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

#3 2015-06-23 11:37:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,555
Website

Re: Updating the system, do this procedure make sense?

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

#4 2015-06-23 15:57:22

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Updating the system, do this procedure make sense?

Alad wrote:

-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 StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2015-06-24 09:24:49

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Updating the system, do this procedure make sense?

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

#6 2015-06-24 09:53:21

tlaloc
Member
From: Lower Saxony
Registered: 2006-05-12
Posts: 359

Re: Updating the system, do this procedure make sense?

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

#7 2015-06-24 10:19:45

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Updating the system, do this procedure make sense?

tlaloc wrote:

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...

https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache wrote:

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.


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#8 2015-06-24 18:39:22

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Updating the system, do this procedure make sense?

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 StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#9 2015-06-24 21:52:51

Proinsias
Member
From: Glasgow
Registered: 2013-08-19
Posts: 121

Re: Updating the system, do this procedure make sense?

I use -Syu pretty regularly, -Sc or -Scc only after a succesful reboot and backup.

Offline

#10 2015-06-25 00:30:19

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Updating the system, do this procedure make sense?

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

#11 2015-06-25 05:18:22

Tambalamba
Member
Registered: 2015-03-13
Posts: 45

Re: Updating the system, do this procedure make sense?

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

#12 2015-06-25 06:10:58

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,397

Re: Updating the system, do this procedure make sense?

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

#13 2015-06-25 06:12:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Updating the system, do this procedure make sense?

kokoko3k wrote:

Does paccache remove uninstalled packages too or just keeps 'n' versions?

paccache --help

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#14 2015-06-25 06:21:47

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,397

Re: Updating the system, do this procedure make sense?

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

Board footer

Powered by FluxBB