What is the different between pacman -Syu, -Syyu and -Syuu?

What is the different between pacman -Syu, -Syyu and -Syuu?

Some will say pacman -Syyu or pacman -Syy to update archlinux rather than -Syu (1)

and -Syuu after changing repositories (2)

I want to know the meaning of the double y and double u

and which is better, thanks!

Asked By: Firestar-Reimu

||

See man pacman, bold formatting added:

-u, –sysupgrade
Upgrades all packages that are out-of-date. Each currently-installed
package will be examined and upgraded if a newer package exists. A
report of all packages to upgrade will be presented, and the operation
will not proceed without user confirmation. Dependencies are
automatically resolved at this level and will be installed/upgraded if
necessary.

Pass this option twice to enable package downgrades; in this case,
pacman will select sync packages whose versions do not match with the
local versions. This can be useful when the user switches from a
testing repository to a stable one.

Additional targets can also be specified manually, so that -Su foo
will do a system upgrade and install/upgrade the "foo" package in
the same operation.

-y, –refresh

Download a fresh copy of the master package database from the
server(s) defined in pacman.conf(5). This should typically be
used each time you use --sysupgrade or -u. Passing two --refresh
or -y flags will force a refresh of all package databases
, even if
they appear to be up-to-date.

The wiki recommends -Syuu when disabling the test repo as you may need to downgrade some packages.

The generally recommended option is to use -Syu. In particular, if using -Sy, -Su should be done either with it (so -Syu) or soon after (see the System Maintenance FAQ).

As for -yy, it is generally not recommended. Use it only if you’re having problems with your mirror. Unless your mirror is acting up and you want to switch mirrors, there is no reason to re-download every package DB file in its entirety every time you want to do an upgrade. You might want to use it when switching mirrors so that all your package DB files are consistent.

Answered By: muru
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.