Arch Linux uses a package manager called pacman, as you may know this is pretty standard on any linux distro, however, I’ve seen that not all the people use the same way to install or upgrade packages.

The simpler way you can install a package with pacman is:

pacman -S package_name

But, this will only install the package on your system and nothing else. You may say but that’s what I want basically, but due to the rolling release nature and since partial upgrades are not supported on Arch Linux this might not be the best approach in the long term and could even break your system.

You can also see a warning in the docs about installing packages using pacman -S package_name:

Warning: When installing packages in Arch, avoid refreshing the package list without upgrading the system (for example, when a package is no longer found in the official repositories). In practice, do not run pacman -Sy package_name instead of pacman -Syu package_name, as this could lead to dependency issues.

The proper way

So, based on the docs the best approach is to install the package and upgrade the whole system at the same time:

pacman -Syu package_name

the same applies when upgrading:

pacman -Syu

What about AUR packages

Well, if you use yay like me you can upgrade your packages with:

# Only AUR packages
yay -Sua

# Full system upgrade. Run `pacman -Syu` first and then upgrades AUR packages
yay

EndeavourOS

EndeavourOS has a script to upgrade packages:

# Only repo packages
eos-update

# Repo packages and AUR packages
eos-update --aur

The eos-update script will basically run pacman -Syu and then yay -Sua by default. If you want to use a different pacman wrapper you must specify it using the --helper option, or updating the proper variable on the config file /etc/eos-script-lib-yad.conf.

Tip: you can also found other helpful scripts opening the welcome app.

Finally, I highly suggest to read the maintenance wiki to learn a little bit more about how Arch Linux packages work and why partial upgrades are not supported.