-
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 -SyuExample 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
yay, or "yet another yogurt", is an AUR helper. Like pacman, yayAUR performs package manager tasks to download, install, update, or remove AUR packages.
- It is recommended to run this command every 1 to 2 weeks.
- FAQ: What is the Arch User Repository (AUR)?
To update the system's native and AUR packages, run:
$ yayCaution
Do not run yay with root permissions, as it may cause accidental (and potentially fatal) system changes. AUR helpers do not require root permissions to manage packages.
The terminal lists 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.
Note
See: yayAUR, yay commands 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.
eos-update --help output:
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.
Important
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
The eos-shifttime tool allows users to revert system packages to versions of specified dates.
To learn more about using eos-shifttime, refer to:
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.
The Arch User Repository, also known as AUR, is 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
AUR packages are community-maintained and unofficial. BEFORE installation, it is highly recommended to check build files (i.e. PKGBUILD) for any malicious code.