I see conflicting info and opinions on this everywhere I’ve searched and since I have a fresh new install, I’d like to educate myself before installing the apps I need.
When should I choose an AUR version of an application, and when should I choose the Flatpak? For example, steam and discord. Are these better to install via the ‘pacman -S’ command or using the Flatpak? And why?
They are not the same. Official repositories contain software built and packaged by Arch Linux Trusted Users. The AUR contains PKGBUILDs (which are recipes for how to package something into a package for Arch Linux). You use these PKGBUILDs to package software yourself locally – you are the TU. When you install these, they are marked as foreign packages, not as repo packages. Anyone can submit PKGBUILDs to the AUR, it’s a community driven project.
Typically yes. Unless you’ve manually added third party repositories to your pacman.conf, pacman with the -S option can only access packages in the official repositories.
No. All packages on Arch Linux are build using the makepkg utility, from a PKGBUILD file. For the packages in the repositories, someone else already did that.
For the packages in the AUR you do it yourself. They are actually not real packages, only recipes how to package stuff yourself. yay is just a tool that automates the process of building and installing a package from the AUR.
Can you share why you choose AUR over flatpaks? I see some people state the security advantage of Flatpak over AUR. So I wonder your opinion and reasoning for your priority choice?
There is no security advantage of Flatpaks over the AUR.
In fact, if you understand the process of packaging packages for Arch, and are careful and you inspect the PKGBUILD and all the accompanying files, you know exactly what goes on into a package you’ve packaged from the AUR. You know where the software is downloaded from, you know how it is installed, what the package contains, everything… It’s a fully transparent system. It does require you to understand what you’re doing, of course.
With Flatpaks, you have no idea what is inside them, because you didn’t package them yourself.
This makes sense. I need to learn how to do exactly what you just stated when installing an AUR. I’ve never used the AUR repository, and I should. Do you have any links where I can learn it?
Also, how do I know if an official arch application exists? Is there a list somewhere I can check? I know steam exists, but I am not sure if discord does.
Flatkpaks are not for a distro like Arch Linux or it’s derivatives.
Everything under the sun is either available in either the official repos or AUR; that too latest versions. And moreover they are packaged especially for the distro compared to a more general approach of flatpaks.
Flatpaks are more geared towards distros like Ubuntu that have a limited or outdated software repos.
If the software is in the AUR then use the AUR.
If not, then use flatpak.
This is my theory. But I deviate from it occasionally. Example: Steam. I had stability issues in the past with steam. Some updates in arch broke my steam installation. Now I am using flatpak steam and everything is ok.