You are not logged in.
Could anyone please explain to me the difference between
pacman -Syu <package>and
pacman -S <package>, or just point me to an article on ArchWiki that explains this? ![]()
Last edited by archbaby (2022-09-26 10:25:01)
Offline
The first one fully updates the databases and all packages prior to installing <package>. The second one just (attempts to) install the version of <package> currently in your local database.
Both are safe and acceptable (but `pacman -Sy <package>` is not safe / appropriate). The first will always work (notwithstanding some issue with the upgrade not related to <package>). The second one may occasionally fail, but it will exit gracefully / safely with a 404 error due to the version of <package> you are trying to install not being available on the mirrors. The likelihood of this failure depends on how recently you last upgraded your local database (i.e., the last time you did a full upgrade with -Syu).
I update regularly, so if / when I want to install a new package, I just use the second form (as that transaction is simpler / easier / faster). But if that second form fails with a 404 error, I just note that it's time to upgrade anyways and then do the first form.
For more details, see `man pacman` as it describes each of those flags (the 'y' and the 'u').
Last edited by Trilby (2022-09-15 16:47:53)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The first one fully...
Thanks so much!!!
Offline