is there a way to just print list of packages available for upgrade ?

I am using pacman (yay) of arch linux.

Thank you for help

2 Answers 2


The package pacman-contrib includes a script that can list all the pending updates without applying them, called checkupdates. pacman-contrib is in the community repository

pacman-contrib source

checkupdates - print a list of pending updates without touching the system sync databases (for safety on rolling release distributions).

  • This is the correct answer. In most cases you do not want to update the main package database when simply checking for available updates. Updating the main database with pacman -Sy or similar sets up for unintended—and unsupported—partial upgrades with subsequent pacman -S. Jun 12 at 1:24

First you need to update your local package repository databases: sudo pacman -Sy or pacman -Sy as root. Pacman then fetches the most recent database from your configured mirrors. (This is not an upgrade, this is just updating the list of available package versions)

Then use this command to list upgradable packages: pacman -Qu This command compares the installed versions of packages to the available ones in your local package repository databases. If you skip step one (above), this will likely produce an empty list.

Same applies to yay: yay -Sy; yay -Qu.

Important Note: Arch does not support partial upgrades and running pacman -Sy sets up for exactly that. See Arch Wiki for reference. If you use this way to check for upgradable packages make sure you always install using pacman -Su $package. Since it can happen that the package version in your local database does not exist on the mirror anymore I recommend to always upgrade the system when installing a new package anyways. So at the end its a tradeoff and choice of workflow in my opinion. The alternative of course is the solution mentioned by Alex which includes an extra package to achieve what you asked for, but without updating the systems package database.

Pacman is one of the best package managers out there (in my opinion) and as most of the time the Arch Linux Wiki is a great source of information: Arch Wiki

  • Using pacman -Sy is not recommended as it sets up for an unintended—and unsupported—partial upgrade. See Alex's answer instead or the Arch Wiki. Jun 12 at 1:29
  • thank you! You are correct and I adjusted my answer to create awareness.
    – Bone
    Jun 13 at 8:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .