Updating using pacman after refreshing mirrors

When mirrors are updated, it was recommended so far to perform a full refresh of the package database, the correct syntax after the mirrors update was:

sudo pacman -Syyu

There is a contradiction in the Manjaro wiki, what to do:

1 Like

Do you mean changing to a different mirrors from the user, or you mean after a mirror updates/syncs itself? Because mirrors update/sync themselves up to a couple times a day, so it will be Syyu basically always. Maybe i am using the wrong terminology and confuse what is update and sync from the server perspective.

As I stated elsewhere…
Its simply old advice.
-Syu is almost always sufficient, and -Syyu should only be used when necessary.
You can check yourself.

sudo pacman-mirrors -f && sudo pacman -Syu

In the pacman-overview this is stated differently to pacman-mirrors, an ordinary user could be confused to decide what to do.

What exactly shall mean

here exactly?

When pacman requests the database from the mirror then - to avoid unnecessary download - pacman asks for Last-Modified for the database.

Only in the event that Last-Modifed on the mirror is newer - pacman requests the complete file.

This can present an awkward scenario where the local database is newer than the mirror but it contains older content.

This may then generate 404 errors because the local databse may then contain references to package versions which no longer exist.

The doubled y is to mitigate such possible issues - especially when you switch branch or mirror.

I have - just today - modified the description in Pacman Overview to read the doubled y as a recommendation when switching branch or mirror to avoid inconstistent metadata.

The page history - Pacman-mirrors - says it is a recent change 2022-06-19 by @Yochanan with comment Using -yy is bad practice.

It is correct that it should only be needed to use -Syu but - pamac mirrorlist timer rewrites the mirrorlist on a weekly or bi-weekly basis - thus increasing the possibility of having inconsistent metadata - in which case the doubled y makes sense - which is also why it was used in the pacman-mirrors dokumentation.

To further the inconsistency - pamac uses copies of the pacman database - which has caused confusion before - pamac and pacman being in disagreement over available updates.

This info should be added to the pacman-mirrors wiki entry in my opinion as otherwise nobody following this guide thinks about potential requirement for double y.

Ah that timer.
…but … uhm …
While I loathe that timer even being a thing…
It updates -Fy … which is not the same as -Sy
(in which case it would have been running a partial upgrade command …)

It runs pacman-mirrors -f 8

Sorry I confused it with the pacman-files-db-refresh.timer as I have no pamac-mirrorlist.timer.
But anyhoo … still - pacman can handle changes to mirrors with a normal sync the vast majority of the time. I cannot speak to pamac.
(kind of funny that a timer introduced for the convenience of pamac users would be more destructive of it … more users then require --force-refresh, but it is the same users who would not normally do so.)