Updating your system

So I found a bunch of different ways to update the system and here are my findings and what I do:

If you want to update the system:

sudo pacman -Syu

If you want to update AUR packages:

yay -Sua

I wanted to post this as I think that alot of newbie mght want to see this.


1 Like

Alternatively, they could just reference one of the nine other topics where this discussed. :wink:

Also, there is no right answer here.

My recommendation is to simply type:


Updates both repo and AUR packages.


Yep I am just trying to be involved :smiley:

Thanks for the clarification!


What of sudo reflector [arguments]

Err…I am not sure exactly what you are asking but that shouldn’t normally part of doing updates. In most circumstances, you should only have to sort your mirrors when you first install the system unless something goes wrong or your situation changes.

I certainly wouldn’t do it with every update.


I thought that reflector sorted out mirrors that were not updated with new package versions. This is an inference I made based on always waiting for mirrors to update in Manjaro. Manjaro of course does not use reflector.

So I guess one could update and there could be a new or different package in 5 min. I know this is the rolling concept, I just inferred that there was some grouping of update releases. :thinking:

Thanks for all you do dalto.

There is no need to run reflector with sudo.

If you want to redirect its stdout to a root owned file (which is probably going to be /etc/pacman.d/mirrorlist), just pipe it to sudo tee.

For example, this is how I’ve set up my mirrors:

reflector --score 20 -f 20 -a 2 | sudo tee /etc/pacman.d/mirrorlist

and after that sudo pacman -Syyu, of course.

In normal circumstances there is no need to do that. You would only do that on a fresh install or if your package download speed slows down significantly.


Thanks for fleshing this out (and making me re-read some man pages). I was blurring the

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

in pacman somehow with reflector. Using the -l switch.
Thanks Kresimir for your observations. Piping through sudo tee is faster.

1 Like

I remember on Manjaro i had that problem sometimes, like you never know exactly when it will become slow as hell, so you’d have to wait for 1 Gb update with slow speed, and then update mirrors :laughing:

1 Like

Yes, but that was because Pamac had a hook running once a week which completely reset your mirrorlist (by running pacman-mirrors python script, which is somewhat equivalent to reflector). So you could configure your mirrorlist to be super fast, and a week later it would be as if you haven’t done anything.

It’s not that it is faster, it’s just that you avoid running a complex script with elevated privileges, when there is absolutely no need to do so (reflector works the same whether you give it elevated privileges or not). On the other hand, tee is completely harmless: it just takes stdin, echos it to stdout, and saves to a file. It will not do anything behind your back.


This is very insightful. Thanks for taking the time to explain it.

1 Like