Command to ckeck If updates are available?

Would this work?
pacman -yu
I want a command to check if updates are available without implementing them
2) same as above, but with details which are these updates (update info) without implementing them?

Thanks!

1 Like

checkupdates in terminal.

9 Likes

pacman -Qu lists packages which have an update available. See https://wiki.archlinux.org/index.php/Pacman/Rosetta

2 Likes

Nice link!

Not working. Pamac shows 10 updates available, the command comes in empty :frowning:

That works! Pacman is sooooo confusing.

In that case yay -Qu

Nope, returns nothing.

Maybe because you have already updated everything ?

Weird

[dmin@X502-CA ~]$ checkupdates | wc
     42     168    1357
[dmin@X502-CA ~]$ yay -Qu | wc
     43     172    1414

No, I have 10 updates in queue

I didint use | WC. I mean I did today, just not in the command line :wink:

checkupdates is a shell script and it uses pacman -Qu hence the discrepancy with yay.
@Alexander I am at a loss as to why pamac is showing you more updates available, unless you are using pamac for things like flatpak.

I never install snaps or flatpaks, against my philosophy.
checkupdates works though

Yeah me too. Nevertheless I am more inclined to trust pacman and yay.
I do use pamac through GUI installed for pamac-aur-git

I updated using pacman -Syu just now, and all is clear.

I learned something new.

The bash script checkupdates , included with the pacman-contrib package, provides a safe way to check for upgrades to installed packages without running a system update at the same time.

https://wiki.archlinux.org/index.php/System_maintenance

3 Likes

What it does seems to be making a copy of your pacman database, syncs it with up-to-date information, then runs a pacman -Qu against the copy - as this does NOT cause any problems with syncing without updating…

As shipped, it strips any [ignored] entries from what it reports, and does NOT include updates waiting for AUR packages, or snaps or flatpaks… Very useful though, for creating your own versions of update notifications (in my case, in conky)

I just use update system from the Welcome App! :smiley:

Screenshot_2020-08-31_18-40-24

4 Likes

It looks like it makes a directory checkupdates-db-1000 under /tmp containing two directories local and sync of which local is just a symlink pointing to /var/lib/pacman/local.