I've been trying out Arch Linux again and the thing that always surprises me is pacman. The way it works seems so unintuitive to me coming from the apt, yum, and dnf worlds.
I know I will get it and it will become internalized but I just wonder what the designer was thinking when making the flags/commands.
It's not as simple as others because it relies on options like
-Syu, not subcommands likeinstall, but I think it's still better. You can do more at once.edit: "You can do more at once" is not the best argument, but it will do for now haha
Right, that's my sense as well. I'm sure my opinion will evolve with more use.
The double y's throw me though.
-SyyHaha, yeah, I'd have to look up what double y's mean. It's been 3 months since I've used Arch Linux with
pacman. I think it means downgrade, so the opposite of one y?No,
When I read this yesterday it was a head scratcher
it's not intuitive the one I have the most is when I need to "apt autoremove" on arch, which makes no sense at all....at the end I have used arch for years but my heart is at debian.
and to be honest I mostly use arch to be updated on linux news, have fun and inflate my ego. Debian just works is more secure and I have more time for other things.
Curious about one thing. You say Debian is more secure. What do you mean? How? Not disagreeing just curious.
well one can't be 100% sure on that as it depends on other factors...but having everywithng updated as soon is it's out by the devs can bring a lot of bugs, including security bugs. Take the xzutils for example, arch almost fell into it, as debian stable would take much more and many more eyes looking at the core before upgrade that package.
Yeah, that makes sense
the critics on debian(stable) on the other side is that it takes too long to update. But as my experience goes being many years on linux as as a sysadmin my opinion is that debian is still more secure than others taking a standard isntall and use.
FWIW I always use Debian on a server for these reasons.
it simply works
Pacman has some pretty weird flag choices, but they make more sense once you get the logic behind them:
-S (sync): Grabs and installs a package from the database
-s (search): Just a modifier telling pacman "don't install anything, just search"
-y (refresh): Updates your package database so it knows what's new out there
-u (update): Upgrades your installed stuff to the newest versions
-Q (query): Shows what packages you've got installed
-R (remove): Kicks a package off your system
So when you run
pacman -S firefox, you might not get the newest Firefox version if your local database is outdated. For the latest, you'd needpacman -Sy firefox, which refreshes your database first, then installs Firefox.pacman -R firefoxjust removes Firefox from your systempacman -Ss firefoxsearches for any packages with "firefox" in the namepacman -Qs firefoxsearches for any installed package with "firefox" in the namethe only flag that that never made sense to me is -y, I have no idea why refresh is y
I don't get the case difference logically. I really lean on mnemonics as well for learning. I just haven't figured that out for pacman. This is how I learned Vim and its something I think about when trying to remember anything new.
-SSync makes no sense to me for install.-sSearch makes sense but I'm not sure why its lowercase-ymakes no sense for refreshing.I swear its like the creator is trolling us all.
-umakes sense but why lower case-QQuery makes sense but why upper case and query being local doesn't. Why not lowercase for local and upper for searching?I would argue that the massive number of CLIs out there that do not follow these patterns is a signal.
I will add... I'm a long time CLI guy and Vim user.
Thanks for the info though.
-U uppercase allows you to install a package from a local file, while still downloading dependencies from the db, so if you do for example
pacman -U ~/firefox.tar.gzwill download all the dependencies for firefox specified in the tar.gz, but then install the version in your .tar.gz not the one in the sync db.And if I remember correctly, there's also another -u, that only works with -R, which removes packages only if they're not needed as a dependency of something else.
Yeah, that sounds right. You're making my point btw :)
Maybe this is a common criticism but I don't recall ever hearing it. Honestly, it kinda seems intentionally obtuse and I get that really. The types of questions you see on forums for Mint are... very different from other distros like Arch.
No trust me, I know. It's extremely unintuitive, wasn't trying to argue otherwise, just wanted to be helpful :)
Yeah, I feel ya.
Sorry... its like nails on a chalkboard.
Q queries your local system but s searches remote repos for packages... while S syncs remote to local...
I'm trying to find the patterns and I do not see them.