checkupdates
Check for available package updates
TLDR
Synchronize the database and list pending updates
List pending updates without syncing the database
Display the list of pending updates if it differs from the last time this option was used
List pending updates and download the packages to the pacman cache (/var/cache/pacman/pkg)
List pending updates using a specific pacman database
Display help
SYNOPSIS
checkupdates [options]
PARAMETERS
--nocolor
Disables colored output, which can be useful when redirecting output to a file or for scripts that do not handle ANSI escape codes.
--nosync
Prevents checkupdates from syncing the package databases (pacman -Sy). If this option is used, the command will rely on the locally cached databases, which might be outdated. Use with caution if you need the most current update information.
--noprogressbar
Disables the progress bar during database synchronization. This is often used in scripts or environments where a dynamic progress bar would interfere with logging or parsing.
DESCRIPTION
The checkupdates command is a utility primarily used on Arch Linux and its derivatives. It allows users to preview available package updates without actually downloading or installing them. This is crucial for maintaining a healthy Arch Linux system, as it adheres to the 'never partial upgrade' philosophy. By running checkupdates, the system's package databases are temporarily synchronized (similar to pacman -Sy), and then a query is performed (similar to pacman -Qu) to display packages that are outdated on the local system compared to the repositories. The command outputs a list of packages along with their old and new versions, making it easy for users to assess the scope of an upcoming upgrade. This capability helps users plan for potential service interruptions, review significant package changes, or simply stay informed about the system's update status before committing to a full system upgrade using pacman -Syu.
CAVEATS
checkupdates is specific to Arch Linux and systems using the pacman package manager. While it syncs databases, it does not download or install packages; a full system upgrade (pacman -Syu) is still required to apply updates. Relying solely on --nosync can lead to outdated information if databases haven't been recently synchronized. Always follow checkupdates with a full system upgrade (pacman -Syu) relatively soon after to prevent potential partial upgrade scenarios, especially if external tools or services are querying updated database information.
OUTPUT FORMAT
The command typically outputs one line per outdated package, formatted as: packagename old_version -> new_version. This clear format aids in quick assessment of pending updates.
ROOT PRIVILEGES
To synchronize package databases (the default behavior without --nosync), checkupdates requires root privileges, usually invoked with sudo. Without these, it will fail to update the databases.
SCRIPT AUTOMATION
Due to its safe and non-intrusive nature, checkupdates is frequently used in custom scripts, desktop widgets, and system monitoring tools to display the number of pending updates to the user, without requiring user interaction for an actual upgrade.
HISTORY
The checkupdates command is not a core binary of the pacman package manager itself but is part of the pacman-contrib package, which provides a collection of useful helper scripts for pacman. Its development emerged from the Arch Linux community's need for a safe way to preview updates without incurring a 'partial upgrade' state (where package databases are updated but packages are not). Over time, it became an indispensable tool for many Arch Linux users, ensuring a more stable and predictable update process.
SEE ALSO
pacman(8), yay(8), paru(8), pacman-key(8)