Asking for escalation before doing anything

It would be nice if when running pacman it would do a -Syu without asking for password until you answer Y.
What’s the point of a password if there is nothing to do.
Even yay will ask for password even when later there is nothing to do.
But when you use yay pkgname an take a choice I believe that it won’t as for a password until it comes time for install.
Endeavour’s Software update from Xfce Setting window won’t as for password until there is a update and you press Apply.

Just a rambling post. lol

1 Like

It needs rights to update the local databases.

Since it updates the databases to determine if there are updates, it pretty much always needs rights.


The command pacman -Syu does two separate things:

  • y refreshes your local package database,
  • u updates your installed packages.

Both of these operations need sudo privileges.

On the other hand, the checkupdates script does not refresh your package database, so it does not need elevated privileges. So you can use that to safely check for updates, without refreshing your local package database.


Not to be crude but how does the Endeavour work? It does say checking for updates and oft time it will find an update.
And why would it need super privs’ just to check if there is an update?

You mean the eos-update-notifier? It uses the checkupdates script for the repos, plus yay -Qua for the AUR.

Just checking if there is an update does not need sudo privileges.

But pacman -Syu does not simply check if there is an update, it does more than that, so it needs sudo privileges even before you answer yes to update.

If you tell pacman to do something that does not need sudo privileges, like search for a package in the repos (pacman -Ss package-name) or print info about an installed package (pacman -Qi package-name) it will happily do that without sudo.


Arch rolls along pretty steadily, so you’ll often find a few updates every day :wink:

in case of install packages ( any modification ) sudo is required ,
for search or any information sudo may not be required

Just to reiterate this, if you just want to check for updates then use checkupdates. It’s a useful habit to get into instead of just syncing the database.


with gnome-software and apper you can pretty update you system without using your password btw… for gtk based i dont know…

but rater to check with checkupdates and use password with pacman :slight_smile:

only my wife uses pamac without password because she forgets password always.

You can use command


It does not ask password if there are no updates available.

1 Like

Which is exactly my point. The person who wrote pacman insisted that it ask for a password when indeed there is no need to; just when you answer Y to the update otherwise why bother with a password.

We use pacman from the Arch repos as-is.

If you think pacman should behave in another way, the best place for such requests is:
There exists a separate area for pacman discussions.


When using the pacman -Syu command, in what order are updates checked, updates installed, and the local database synchronized?

First the database is refreshed, then the updates are checked, then you’re prompted to continue installing updates, and if you reply with yes, the updates are downloaded and installed.

1 Like

This is understandable, but what is the difference between synchronizing a database and updating a database? Pacman -Syu, by definition, synchronizes, among other things.

Pacman manual calls it “refresh”. It downloads a copy of the master package database from the servers and saves it on you system. This is how it knows which packages need to be updated.

S is the synchronise operation, which it takes y (database refresh) and u (sysupgrade) as options (among others).

So actually this process means synchronization. It is only a question of interpretation that has arisen in me in connection with the subject. However, if you use the checkupdates script, there is no database update, so how do you find out if there are any available package updates?

I believe it downloads the package data to a temporary location and uses that for the check.

1 Like

That seems logical. I think after rebooting the contents of the temporary location will be deleted. Thus, it is understood that checkupdates only asks for the password to install the packages, while pacman -Syu asks for the password immediately after issuing the command. The question is what would happen to pacman -u, if there were such a combination.

@jonathon gave a basic explanation of how checkupdates does its magic: