You are not logged in.
Assuming that package-x is already installed on my system, and that it is the only package that needs updating, what is the difference between:
sudo pacman -Syu
sudo pacman -S package-x
I know the first syncs, refreshes package list, and also install all updates, but I'm talking specifically about package-x. Is there a difference between 'upgrading', and 're-installing'?
Last edited by solar impulse (2012-03-04 19:05:37)
Arch | Xmonad
Offline
You can run
sudo pacman -Syu package-x
too.
'sudo pacman -Syu' won't install any new packages (unless some packages get new dependencies, like pacman 3 -> pacman 4 upgrade) while 'sudo pacman -S package-x' will (re)-install package-x.
You shouldn't cherry-pick updates so just run 'sudo pacman -Syu'. If you want to install a new package, first update your system, then run 'sudo pacman -S package-x'.
Edit:
s there a difference between 'upgrading', and 're-installing'?
'upgrading' means 'installing a new version' while 're-installing' means 'installing the same version'.
Last edited by karol (2012-03-04 18:40:43)
Offline
You can run
sudo pacman -Syu package-x
too.
'sudo pacman -Syu' won't install any new packages (unless some packages get new dependencies, like pacman 3 -> pacman 4 upgrade) while 'sudo pacman -S package-x' will (re)-install package-x.
You shouldn't cherry-pick updates so just run 'sudo pacman -Syu'. If you want to install a new package, first update your system, then run 'sudo pacman -S package-x'.
Edit:
solar impulse wrote:s there a difference between 'upgrading', and 're-installing'?
'upgrading' means 'installing a new version' while 're-installing' means 'installing the same version'.
Got it.
So is there any difference between updating and reinstalling? What does reinstalling do that udating doesn't? I'm assuming it's the same thing with a different label.
Arch | Xmonad
Offline
Assuming you've run 'sudo pacman -Sy' first, when running 'sudo pacman -S package-x' you're not re-installing, you're updating / upgrading package-x.
Edit: Argh, I meant "when running 'sudo pacman -S package-x'". Fixed it now.
Last edited by karol (2012-03-04 18:47:22)
Offline
Assuming you've run 'sudo pacman -Sy' first, when running 'sudo pacman -S package-x' you're not re-installing, you're updating / upgrading package-x.
Edit: Argh, I meant "when running 'sudo pacman -S package-x'". Fixed it now.
That makes sense, thanks.
Arch | Xmonad
Offline
Here's what I think is the difference:
If you're missing a file from package foo (pacman -Ql foo) or that file is corrupt, reinstalling it will replace that file.
But if you're updating your system (pacman -Syu), pacman sees that it has package foo up to date and doesn't do anything.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Won't 'pacman -S package-x' reinstall the existing version in the absence of an update? Whereas 'pacman -Syu' will only affect package-x if package-x is (1) not currently installed but a newly required dependency for a new version of an installed package or (2) already installed with a newer version available?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Here's what I think is the difference:
If you're missing a file from package foo (pacman -Ql foo) or that file is corrupt, reinstalling it will replace that file.
But if you're updating your system (pacman -Syu), pacman sees that it has package foo up to date and doesn't do anything.
So what I learned was:
Installing an already-installed package can be seen as updating (if there is a newer version) or actual reinstalling if that package is damaged. Therefore when running pacman -Syu, pacman checks for new dependencies or updates to currently-installed packages, then does the equivalent of pacman -S on said packages, which either installs or updates depending on whether they are already installed or not.
Correct?
Arch | Xmonad
Offline
Installing an already-installed package can be seen as updating
Again, only if you've run 'pacman -Sy' first, otherwise pacman won't know if there's a new version.
Apart from this, yes, you are correct.
Offline
Also, if you -Sy and package-x is NOT the only available package, you may break your system.
pacman -S package-x installs package-x from the database you already have (so even if there's an update it will not be installed until -Sy, as explained above).
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline