Hacker News new | past | comments | ask | show | jobs | submit login

If it weren't for pacman's weird user interface (not functionality, just the UI), I might have already switched to Arch. As Ubuntu gets worse (it seems like every day there is a new anouncement that sucks), pacman looks better and better.



pacman is a little awkward, but I prefer it to apt/dpkg, which have sub-commands, each with their own flags, some of which are undocumented. pacman, on the other hand, has ALL options documented in one fairly short man page.

The trick to understanding pacman is to understand how it maintains databases of packages, and what it means to "sync".

There are several "databases" that pacman deals with:

  * "the database", (`/var/lib/pacman/local/`)
    The database of currently installed packages
  * "package databases", (`/var/lib/pacman/sync/${repo}.db`)
    There is one of these for each repository.  It is a file
    that is fetched over plain http(s) from the server; it
    is not modified locally, only updated.
The "operation" of pacman is set with a capital flag, one of "DQRSTU" (plus -V and -h for version and help). Of these, "DTU" are "low-level" (analogous to dpkg) and "QRS" are "high-level" (analogous to apt).

To give a brief explanation of cover the "high-level" operations, and which databases they deal with:

  "Q" Queries "the database" of locally installed packages.

  "S" deals with "package databases", and Syncing "the
      database" with them; meaning it installs/updates
      packages that are in package databases, but not
      installed on the local system.

  "R" Removes packages "the database"; removing them from
      the local system.
The biggest "gotcha" is that "S" deals with all operations with "package databases", not just syncing "the database" with them.

Edit: formatting. I've over-done quotation marks to make it clear when precise wording matters.


What UI are you talking about? pacman is a relatively simple to use cli tool. -S to install something, -Ss to search for something -y to update the package list, and -Su to upgrade packages; that's basically four flags to memorize. Or do it all at once with -Syu.


It's simple, but the switches are rather odd. I get the point of S, Y, U etc... and then the minor options of yu etc... but it's rather arbitrary in practice.

Note: -S isn't "install," it's for syncing which does all manner of things including installs, but not removals (oddly enough). It's little things like this that bother me about pacman.


I can't tell if you're being sarcastic. I guess that means you've won.


It is also valuable to know -R and c and s to remove a package and its dependencies and dependents.


I felt the same way, but once I actually learned it, it's pretty straightforward. Besides just installing packages, -Qs, -Ss, and -Si give me most of the information I need in a digestible way. I never did figure out how to do most of that with apt-get. After working out the kinks, I'm loving Arch on my laptop, 10-second startups and ~6 hours of battery, with basically nothing running that I didn't ask for.

Working out the kinks was/is admittedly non-trivial. Read the directions. ;)

Edit: OK, 18 seconds. Still pretty good.


The idea of only running things that I decide to run is probably the most appealing thing to me about Arch/Gentoo. And I'm sure I'll figure out the user interface, but I still think it is weird. I'll probably think of maybe 5 more excuses to keep using Ubuntu before I toss in the towel and switch to Arch.

Just out of curiosity, what are Arch desktop users using for servers, where the rolling-release format isn't as acceptable?


Generally I only have to use the following: pacman -Ss (for the occasional search)

pacman -Syu [pkgname] (I almost always use yu to ensure that things are always in sync)

pacman -Rsun pkgname

pacman -Qi pkgname

pacman -Sc (used every so often)

I would say those cover 99% of my interaction with pacman. I'm not sure of any other interfaces to use it so it would be interesting to know more about how you use pacman.


I've got to say, as somebody who is very comfortable with the command line (my job is linux server admin) but has never used arch before, that sounds pretty damn obtuse.


There are several GUI wrappers around pacman (and several wrappers to unify it with AUR), but for the most part that's it.

I'd add that I'd be careful about -n on -R (don't back up configuration files when removing a package); I'd let pacman back them, then catch them in my usual `sudo find /etc -name '.pac'`.


<scarcasm>You know there is a nifty feature called bash aliases which is present in linux. so 'pacman -Syu' can simply be called 'upgrade'</scarcasm>

But seriously, alias commands you use, no need to remember the oddities.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: