Is pacman -S safe to use if you don't update the package list?

Lets say, you wanted to hold back on an update but you want to install an additional package for example.

Installing it via pacman -S shouldn't be a partial upgrade because you're not adding a newer package to your older packages but adding a similarly old package to it, correct?


Want I find strange is that the older versions are not listed on the repos.
For example wine which has recently been updated from 5.9-1 (It says 5.10 here and here but it's 5.12-1 in the repos).

So if I installed it like this
7583758929473289
would it get version 5.9-1 (like it says) which would be safe if I understand correctly or would it get the newer version because the old one isn't available?
3475843758937459

It is a partial upgrade when you're holding back on the other updates. The correct method is to upgrade your entire system first and only then install additional packages.

It would be safe. As long as you haven't updated your database you won't be in a partial update scenario.

However, only the latest version of the package is in the repo so it will fail when it tries to download the older package.

2 Likes

Thanks exactly what I needed to know.

So, if you are stalling; you just can't install anything.
Is there a service in the standard version Manjaro (kde) that updates your database automatically, so you could accidentally do a partial upgrade by running pacman -S [package] in such a situation.

This depends on the server - they dont all act the same.

But in any case generally you should avoid installing without updating first.

And Yes there is... well it doesnt update your DB .. but its sorts your mirrors which would require a DB refresh ...

pamac-mirrorlist.service

[Unit]
Description=Generate mirrorlist
Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
ExecStart=/usr/bin/pacman-mirrors -f8

(I find it heinous so its turned off .. up to you how you feel about it)

I guess I should note .. pamac always refreshes the db before installing .. so if you only use that to install software this service running shouldnt nip you.
But ... pacman doesnt do that. So You would have to run -Syy every time. Though .. we dont do that without including the u (for update) .. so it means if you have this service and use pacman you should always use pacman -Syyu ... or turn the service off and manage your mirrors/use pacman as you normally would.

1 Like

Thanks for the info; very interesting.

It seems I am currently using that service (but I think I will turn it off) and always installed packages using pacman -Syu [package]. Which should be safe because it rebuilds the mirrorlist during booting, correct?
But if I rebuild the mirrorlist in that timeframe where the single -y flag wouldn't actually do anything because I did it a few minutes ago and do pacman -Syu, would it just fail to update or could it cause a partial upgrade?

No ..
That service sorts mirrors and creates a list yes .. but then you have selected a mirror, and it could possibly be new mirror.
In which case 2 y's is required.
Example - if you I wanted to sort mirrors, the only reasonable way (as shown in wiki) would be:

sudo pacman-mirrors -f && sudo pacman -Syyu

Anything other than exactly that pacman command after a mirror change is probably a bad idea.
(except possibly including 2 us, ex -Syyuu to allow downgrades . such as if you switch from Unstable Branch to Stable Branch, or a package in the repo was rolled back by the devs)

So because that service could have rebuild the mirrorlist, you should always run pacman -Syyu instead of pacman -Syu ?

Yes, if that service is running.
Since it only runs once - you could technically just do that the first time of each desktop session.. it would not be required after that .. just a regular Syu.

But wouldn't using pacman -Syu after booting (mirrorlist changed) also always check the new mirror in the mirrorlist?
Or would it somehow have cached the old mirror and would check it even if there was a new mirror added, which you can only check with yy.

man pacman

       -y, --refresh
           Download a fresh copy of the master package database from the server(s) defined
           in pacman.conf(5). This should typically be used each time you use --sysupgrade
           or -u. Passing two --refresh or -y flags will force a refresh of all package
           databases, even if they appear to be up-to-date.

Back when pacman-mirrors was only run manually it was always stressed that you should use the 2 y's after any run of pacman-mirrors

Oh, because there could be some changes to the package but it could still appear to be up-to-date.
Thanks man!

Plasma Discover (notifier service).
Verify either it's not installed, or remove notifier from autostart applications (Plasma System Settings).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by