19
submitted 20 hours ago by thingsiplay@beehaw.org to c/linux@lemmy.ml

On Archlinux it is not recommended to update only one package with the package manager pacman. Let's say I have 11 packages, and one of them is extra/firefox (true story). Updating only a pacman -S firefox could introduce problems, but installing a new single package if it wasn't there is okay.

So my question is, could we get around this by removing and installing the same package again in one go: pacman -Rs firefox && pacman -S firefox

you are viewing a single comment's thread
view the rest of the comments
[-] thingsiplay@beehaw.org 1 points 19 hours ago

But I'm not doing pacman -Sy package. That is not what I am talking about. I am only talking about pacman -S package, which is not updating the system partially. IF the package depends on something else to update, then the system would need to be updated. But that is not what I was asking, because I only talk about the package with -S package. I just chose firefox as an example, it could have been any other package.

To make it clear, when I say -S firefox, then I mean really that without updating a dependency like libssl. The idea is to install only new packages without updating anything on the system. I guess as you say it depends on the dependencies of the package, if this is feasible.

[-] kevincox@lemmy.ml 12 points 19 hours ago* (last edited 19 hours ago)

But that is my point. Just running pacman -S firefox is fine as long as you didn't run pacman -Sy at some point earlier. It won't update anything, even dependencies. It will just install the version that matches your current package list and system including the right version of any dependencies if they aren't already installed.

But that means if you already have Firefox installed it will do nothing.

[-] thingsiplay@beehaw.org 1 points 19 hours ago* (last edited 19 hours ago)

We can install a new package if it wasn't installed with pacman -S firefox. That is not a partial upgrade of the system. Right? What i don't understand is, when I uninstall with pacman -Rs firefox, delete the cached firefox package (only that file), then the system is in the same state as before I installed it. Then -S firefox should be okay, right? And it even looks up the new version. This is my question, if that would work correctly.

IF no dependency tries to update too. Off course in that case I would stop. Without pacman -Sy, I never do that anyway, only -Syu.

[-] kevincox@lemmy.ml 12 points 18 hours ago

IF no dependency tries to update too. Off course in that case I would stop. Without pacman -Sy, I never do that anyway, only -Syu.

That's all you need to know. As long as you always use pacman -Syu you will be fine. pacman -Sy is the real problem. The wiki page is pretty clear about the sequences of commands that are problematic https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported.

Right? What i don’t understand is, when I uninstall with pacman -Rs firefox, delete the cached firefox package (only that file), then the system is in the same state as before I installed it. Then -S firefox should be okay, right? And it even looks up the new version.

This isn't correct. It won't look up the new version. Assuming that the system was in a consistent state it will download the exact same package that you deleted. The system only ever "updates" when you run pacman -Sy. Until you use -y all packages are effectively pinned at a specific version. If the version that gets installed is different than the one you removed it probably means that you were breaking the partial update rule previously.

this post was submitted on 01 Oct 2025
19 points (100.0% liked)

Linux

58655 readers
295 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS