-
Notifications
You must be signed in to change notification settings - Fork 0
Update system packages
There are 3 commands frequently used for Endeavour OS system updates: pacman -Syu, yay, and eos-update. It is generally recommanded to run updates on a daily to weekly basis for Arch-based distros.
pacman is the package manager used to install and update programs in Arch Linux. To perform a full system update and refresh, run:
sudo pacman -Syu
Example terminal output: sudo pacman -Syu
[user@computer ~] $ sudo pacman -Syu
[sudo password for user]:
:: Synchronizing package databases...
endeavouros 17.0 KiB 3.17 KiB/s 00:05 [--------------------] 100%
core 117.4 KiB 23.3 KiB/s 00:05 [--------------------] 100%
extra 8.0 MiB 1447 KiB/s 00:06 [--------------------] 100%
multilib 125.4 KiB 416 KiB/s 00:00 [--------------------] 100%
: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Package (2) Old Version New Version Net Change Download Size
endeavouros/package-1 25.11-1 25.11.1-1 0.00 MiB 0.02 MiB
endeavouros/package-2 12.5.2-2 12.5.3-1 0.02 MiB 3.20 MiB
Total Download Size: 3.21 MiB
Total Installed Size: 9.42 MiB
Net Upgrade Size: 0.02 MiB
# enter Y to confirm the updates
:: Proceed with installation? [Y/n] # enter n to cancel the operation Other basic pacman commands include:
| Command | Description |
|---|---|
pacman -S <pkg> |
Installs the specific package. |
pacman -Rs <pkg> |
Removes a package and its dependencies. Using the -Rs option helps to prevent orphan dependencies. |
pacman -Ss <pkg> |
Searches for a specified package on the system. |
pacman -Qi <pkg> |
Retrieve a list of the dependencies a package needs to run. |
Note
See: pacman manpage, pacman wiki
yayAUR (or "yet another yogurt") is one of the most popular AUR helpers in the Arch Linux community. Like pacman, yay works as a package manager, simplifying the process of downloading, installing, updating, and removing AUR-specific packages.
To update the system's native and AUR packages, run:
yayImportant
It is recommended to run yay every 1-2 weeks.
The terminal will list the packages available to upgrade and may ask for the user to select:
- Which package provider should be used (where to download files from)
- If any packages should be excluded from the upgrade
- If the Make dependencies should also be removed
- Etc.
Caution
Do not run yay with root permissions (sudo), or it may cause accidental (and potentially fatal) system changes. AUR helpers do not require root permissions to manage packages.
Example terminal output: yay
[user@computer ~]$ yay
[sudo] password for user:
:: Synchronizing package databases...
endeavouros is up to date
core is up to date
extra is up to date
multilib is up to date
:: Searching AUR for updates...
:: There are 2 providers available for cargo:
:: Repository extra
1) rust 2) rustup
Enter a number (default=1):
==> yay may upgrade packages to a verson newer than the one from Endeavour OS updates, as the EOS team confirms package stability before including packages in system updates. You can specify which AUR packages to update, or forgo the update with Ctrl+Shift+C in the terminal.
[!NOTE]\ AUR packages are community-maintained and unofficial. It is highly recommended to check build files for any malicious code before installation. See:
yayAUR,yaycommands list, Arch User Repository (AUR), AUR helpers
Endeavour OS provides an optional update script that utilizes pacman and yay to run basic system updates with additional options.
eos-updateDepending on user preference, eos-update can be used in place of yay or sudo pacman -Syu. In practice, eos-update --aur and eos-update perform the same tasks as yay and pacman -Syu, but provide an added layer of options. Some options may require more advanced setup.
Notably, running eos-update may be more helpful for users just needing a quick fix to the system, and/or for users who do not update the system frequently.
Example terminal output: eos-update --help
eos-update is a package updater for EndeavourOS and Arch.
eos-update is implemented as a wrapper around commands pacman and optionally yay/paru.
Essentially runs commands 'pacman -Syu' and optionally 'yay -Sua' or 'paru -Sua'.
eos-update includes (by default) special help in the following situations:
- A dangling pacman db lock file (/var/lib/pacman/db.lck).
- Disk space availability for updates (with a configurable minimum space).
- Keyring package updating before updating other packages.
- Running the 'sync' command after update.
Optional help:
- Can clear package databases in case of constant problems with them.
- Can reset keyrings in case of constant problems with them.
- Can check the validity of the locally configured lists of mirrors.
- Updates AUR packages (with option --helper, see Usage below).
- Ad hoc check for Nvidia GPU driver vs. kernel updates (non-dkms only).Some update errors are caused by issues with mirrors and mirrorlist configurations. These issues can be fixed by re-ranking mirrors.
Note
Outdated package databases will cause errors when pacman tries to retrieve the latest package files. This can be fixed through regular mirror maintenance.
See: Update mirrors guide
Running a sudo pacman -Syu update may fail and display the following errors:
error: failed to commit transaction (conflicting files)
<example>: /example exists in filesystem (owned by filesystem)
<example>: /lib/systemd/system/example.service exists in filesystemThese issues can be resolved with manual intervention. Uninstall and remove the package from the system, then reinstall:
sudo pacman -Rdd <example>
sudo pacman -Syu <example>You can also uninstall/remove the package, then run a full system update with pacman instead.
Here are some excerpts from the pacman manpage:
pacman option |
Description |
|---|---|
-S, --sync |
Synchronize packages. Packages are installed directly from the remote repositories, including all dependencies required to run the packages. |
-y, --refresh |
Download a fresh copy of the master package databases from the servers. This should typically be used each time you use --sysupgrade or -u. |
-u, --sysupgrade |
Upgrades all packages that are out-of-date. Each currently-installed package will be examined and upgraded if a newer package exists. |
Note
See: pacman manpage
The -Syyu option forces a refresh of all package databases, even if they appear to be up to date. This may sometimes be helpful when switching from broken to working mirrors.
However, it is not necessary to use "double" pacman commands in most circumstances. In the interest of keeping mirror bandwidth free for other users, they should only be used when necessary.
AUR stands for the Arch User Repository, a large library of user community-produced packages for Arch Linux.
Popular and well-maintained packages are voted on by the community to include in the official Arch extra repository.
Downloading and building an AUR package is fairly simple:
-
Clone the
gitrepository listed on the package's AUR page:git clone https://aur.archlinux.org/pkg.git
-
Change into the package directory:
cd <pkg>
-
Build and install the package with:
makepkg -si # or pacman -U pkg-version-1.0.1.pkg.tar.zst
Warning
Always review the installation files (i.e. PKGBUILD) for any malicious code. Good user standing is required to maintain AUR packages, but this is not a foolproof preventative measure.