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

  • pitiable_sandwich540@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    And it even looks up the new version. This is my question, if that would work correctly.

    I think this is where you might have misunderstood what pacman -S does. It does not look for a new version, but tries to install the version of the package from last time you updated your local package list.

    If the repository has a newer version since the last time you updated, you would not find the package version you are looking for. As I try to update at least once a day, I haven’t had this happen yet (so i am not 100% how this would manifest).

    To install only the newest version of firefox on the server you would habe to run it with pacman-Sy firefox which is not supported.