Is there a risk with using pamac and pacman

Hello,
this is maybe a stupid question and probably has already been answered, but I asked my if there is a risk with using pamac-cli and pacman? For example if I do:

pamac install anyPackage

and then do

sudo pacman -Syu
1 Like

No, you can mix them.

They both use the same backend, libalpm, to install packages

3 Likes

The only thing that comes to mind is that one has to make sure to have a fully updated system before attemting to install an specific package. So I guess the preffered order of the commands would be:

pamac update or pacman -Syu

and then:

pamac install anyPackage or pacman -S anyPackage

See for eaxample:
https://wiki.manjaro.org/index.php?title=Pacman_Overview#Installing_Packages

3 Likes

Thank you for your quick answer.

2 Likes

pamac install already check for updates by default

2 Likes

Great, thanks! I actually didn't Know that.

You can use both Pamac and pacman, and you can use them interchangeably.

Although it seems more logical to me to start updating with sudo pacman -Syu and then install stuff with pamac install <PACKAGE>, but you get the idea.

This is very bad advice. It should be pacman -Syu or pacman -Syyu, not pacman -S.

Please read the whole post :wink:
Well, let me quote a piece of it for you:

:innocent:

Actually, you may use pacman -S when you are up to date.

Even if you are out of date, if you run pacman -S on a package that is out of date, it will fail to retrieve the package since the package (in a particular version) listed in your local databases is not on the repo anymore, which is a sign that your system is outdated. If it succeeds, it should still work properly, unless a rebuild has been missed.

What is a bad idea though is to casually run pacman -Sy <NAME>, or pacman -Sy followed by pacman -S <NAME>, because it will update your local databases without actually updating your whole system, and the package you are downloading is way more likely to not be built to work in your outdated environment.

Or as I said use pamac install that takes care of refreshing your databases, updating your system and installing the needed packages :sunglasses:

As @Frog already pointed out pacman -S ... is perfectly safe:
https://wiki.archlinux.org/index.php/Pacman#Installing_packages

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

Forum kindly sponsored by