pull down to refresh

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.
68 sats \ 3 replies \ @ek 21 May
It's not as simple as others because it relies on options like -Syu, not subcommands like install, 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
reply
Right, that's my sense as well. I'm sure my opinion will evolve with more use.
The double y's throw me though. -Syy
reply
0 sats \ 1 reply \ @ek 21 May
Haha, 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?
reply
No,
In Pacman, the double yy in the command pacman -Syyu forces a refresh of the package databases even if they appear to be up-to-date.
When I read this yesterday it was a head scratcher
reply
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 need pacman -Sy firefox, which refreshes your database first, then installs Firefox.
pacman -R firefox just removes Firefox from your system pacman -Ss firefox searches for any packages with "firefox" in the name pacman -Qs firefox searches for any installed package with "firefox" in the name
the only flag that that never made sense to me is -y, I have no idea why refresh is y
reply
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.
-S Sync makes no sense to me for install. -s Search makes sense but I'm not sure why its lowercase -y makes no sense for refreshing.
I swear its like the creator is trolling us all.
-u makes sense but why lower case -Q Query 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.
reply
-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.gz will 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.
reply
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.
reply
No trust me, I know. It's extremely unintuitive, wasn't trying to argue otherwise, just wanted to be helpful :)
reply
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.
reply
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.
reply
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.
reply
Curious about one thing. You say Debian is more secure. What do you mean? How? Not disagreeing just curious.
reply
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.
reply
Yeah, that makes sense
reply
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.