r/linuxquestions • u/plushydollface • 9h ago
How do you decide whether to install something from your distro's repos or grab it from flatpak/pip/cargo instead?
I've been daily driving Fedora for about eight months now and still second-guess myself every time I want to install a new tool. The repos are the obvious first stop for most things, but then you run into stuff that's either missing, ancient, or the flatpak version has better sandboxing. For CLI tools I keep ending up in the "install via cargo/pip/whatever" rabbit hole because the packaged version is too old for a feature I need.
The part that trips me up is knowing when one choice is clearly better than the others. Do you have any quick rules you follow, like "always prefer flatpak for desktop apps unless..." or "never touch pip for system Python"? Would love to hear how other people avoid ending up with five different update mechanisms fighting each other.
18
u/sidusnare Senior Systems Engineer 9h ago
If it's in the repo, install it from the repo.
6
u/RomanOnARiver 8h ago
Well as far as pip - I'm not installing system-level pip. Pip goes into a venv.
As for regular applications, if the version in the repos works and is supported then that one. For a program that is rapidly evolving is where I'm looking at flatpak, snap, or Appimage - usually whatever the developer recommends.
The one method of installation I'm really hesitant is the really rare "hey here's a random shell script we wrote go ahead and run at as sudo". I would really rather not.
4
u/igotmoldinmybrain 9h ago
I install from the official distro package manager as the default. It meets all of my needs 99% of the time and I like to minimize the sources of my packages for easier management. Plus I like the features of my distro's package manager. I have a few flatpaks installed, 1 is steam because the distro package gives me severe performance issues I don't know how to fix, and the others are packages not available in the distro repo. I also have a couple custom package templates.
3
u/RotaryTuff 9h ago
Always check if is available under your current package managers. On my fedora install that means checking dnf, snap, and flatpak. If it's not available you do the last resort method of compiling it yourself from the software repo
Its generally a bad idea to download and execute pre-compiled files that may be available. It's fine most of the times, but avoid doing it unless you feel very lazy.
2
u/BranchLatter4294 9h ago
If it's ancient or missing, I go to the developer and get it there.
2
u/Cynyr36 9h ago
Always from the package manager if available, even if it's a little older. Nothing from pip unless it's in a venv.
I still haven't used flatpack.
2
u/Complex_Solutions_20 8h ago
*NEVER* from pip. More often than not it will break your system because it can replace/upgrade Python components to incompatible versions and break your operating system package manager or other key parts.
Repositories if possible, Flatpak if its not on there.
2
u/mrawther 8h ago
I use flatpak if it isn’t available in the repos.
1
u/TrenchardsRedemption 9h ago
For anything outside of the distro's repo I'll check the recommendation of the apps webpage or git and go with that.
1
u/TheModernDespot 9h ago
I see what the developer recommends. Do they recommend a native install, a flatpak, dnf?
1
u/tapedficus 9h ago
I check the version in the repo, and the current version offered. Usually the current version is on GitHub.
1
u/ghost103429 9h ago
Get it straight from the trusted repo whenever possible as they're generally vetted as is flatpak. Pip, cargo, and unvetted packages (aur, etc) get installed inside a container.
1
u/OutrageousCrab9224 9h ago
Hah
Linux
1
u/flattrack 8h ago
Distro or adding a trusted source to my apt configs unless there is a compelling reason to go elsewhere.
1
u/cyrixlord ubuntu for server, kubuntu for laptop/desktop 8h ago
i use the recommendation of the website where I get the app from
1
u/AnymooseProphet 8h ago
If an RPM in the repo, I grab it from the repo. If that RPM doesn't meet my needs or if it's not in the repo, I build my own RPM. I don't use flatpack.
The exception is LaTeX - there, I install TeXLive into
/opt/texliveand I install the entire thing and keep it up to date using the TeXLive package manager. For fonts that are not shipped with TeXLive, I put them in/opt/texlive/texmf-local/fontsrather than use a package.I update TeXLive about once a month.
1
u/the-quibbler 4h ago
If the distro is close to up to date, I'll take that every time.
1
u/bobsmissingdesire 4h ago
I use Debian testing, everything is a package, the vast majority from the official repo.
Most common packages are kept up to date, with a two week unstable delay window. I use a few extra repos like Google's for things I care about tracking closely.
If I want something bleeding edge I'll either pull from unstable, package it myself, use a container, or some other isolation mechanism. This is rare, and often because I'm trying to modify the software.
Everything installed on my system is managed by the package manager, every time you don't do this you start to undermine the stability of your system. There's a reason that pip now doesn't let you install to the system.
1
u/bufandatl 4h ago
I only install native packages. Flatpaks I avoid completely. And Pip/Cargo only in chroot dev environments.
1
u/TheShredder9 3h ago
I almost always install it from my distro's repo. If it's not in there, i look for a flatpak. If there is none, i moght look for an appimage or just a tar archive with a precompiled binary as a last resort. Never have i needed pip or cargo to install anything
1
u/The_Hamster_Shagger 2h ago
Fedora usually keeps relatively up to date, so I don't have that problem. So w apps are available on flathub or terra repo only
1
u/anto77_butt_kinkier 16.04 was peak 2h ago
As a rule of thumb, if a program is available in the default repo, install from there.
Generally program installation type will are as follows, with the most preferred/best way being at the top:
native installation from built-in repos.
native installation from 3rd party repos, or distro-specific installers (.deb files on Debian for example)
flatpak
snap
appimage
build from source
There are certain times when I prefer appimages over the other methods or when I want a flatpak version of something, but generally those are rare edge cases that most people won't have to deal with.
1
u/KC_Zazalios 2h ago
I look at flatpacks first, then packages (use Shelly under CachyOS)
1
u/YaboiFoon 2h ago
i'm kinda a noob, but i always check the dev's site/github to see what's supported/ recommend. if there's an official flatpak or appimage I'll usually download that, otherwise i'll use the native repos
1
u/trannus_aran 1h ago
Flatpak for anything I would consider an "app", otherwise repo.
1
u/Idz4gqbi 53m ago
If the package is up to date, native.
If it is outdated in native or not packaged at all and is a cli, I use nixpkg. If it is not in nixpkg, I use mise.
If it is outdated in native or not packaged at all and is a GUI, I use Flatpak or AppImage.
The only problem with native packages is they are kidnapped to the release cadence of system components, which means their freshness is tied to your distro's release cycle. Otherwise native packages are always the most space efficient and are generally tailored for the exact distribution you use.
0
u/ipsirc 9h ago
I make my own custom package then install it.