Why do we use pamac and not pacman?

Why is pamac so bad?

#Trying to update system with pamac, fails.
$ pamac update
[sudo] password for rabcor: 
Preparing...
Synchronizing package databases...
unable to lock database
Failed to synchronize databases
Nothing to do.
Transaction successfully finished.

#Trying to update system with pacman, succeeds
$ pacman -Syu
:: Synchronising package databases...
 core                                                       165,9 KiB   178 KiB/s 00:01 [###################################################] 100%
 extra                                                     1849,4 KiB  3,11 MiB/s 00:01 [###################################################] 100%
 community                                                    7,1 MiB  6,15 MiB/s 00:01 [###################################################] 100%
 multilib                                                   180,6 KiB  2,32 MiB/s 00:00 [###################################################] 100%
 home_justkidding_arch_Arch                                  30,4 KiB  48,3 KiB/s 00:01 [###################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

#Trying to update system with pamac again, it still fails to update database but because pacman already did it it can now update
$ pamac update
Preparing...
Synchronizing package databases...
unable to lock database
Failed to synchronize databases
Resolving dependencies...
Checking inter-conflicts...

Why does manjaro not just stick with pacman out of the box?

And is there any downside if I use pacman instead of pamac for installing/updating packages or the system?

Who’s we? Why are you using pamac and not pacman? :wink: You’re free to use whichever you’d like.

That’s not related to pamac, your pacman database is locked as something else is using it. If you’re sure nothing is, either reboot or …

For updating repo packages, no. However, pamac has many features like AUR, Flatpak and Snap integration.

6 Likes
That’s not related to pamac, your pacman database is locked as something else is using it.

Obviously this isn’t the case, if it was pacman couldn’t update either (even if there was a duplicate instance of pacman running in the background somewhere that was using it and i forgot about it, that would stop pacman from updating just as surely as pamac, this can only really be a pamac issue)

Hell, let me show you:

$ ls /var/lib/pacman/
local  sync
$ pamac update
Preparing...
Synchronizing package databases...
unable to lock database
Failed to synchronize databases
Nothing to do.
Transaction successfully finished.

As you can see db.lock doesn’t exit, but pamac still fails to update the database. (And like I explained, if it did it would have stopped pacman too, not just pamac)

By we I meant manjaro users, manjaro wiki seems to want users to use pamac rather than pacman most of the time, but you have answered my question to satisfaction.

I don’t want flatpak or snap, and I use yay for AUR.

As for why Pamac fails, I don’t care enough to actually troubleshoot it since I prefer pacman in the first place :slight_smile: (which is why it’s posted in non-technical)

sudo pacman -Rns pamac-gtk

Perhaps you need to add other packages which depends on pamac e.g. manjaro-application-utility and tray icon packages.

If pamac is unable to lock database, the lock file might be in /var/tmp/pamac/dbs/
Databases damaged cannot update - #4 by brahma
Pamac doesn't detect new updates in Unstable branch - #19 by raguse

You are free to use whatever you like but I would suggest using one AUR helper to avoid potential conflicts

5 Likes

For me, the main appeal of pamac is its more user-friendly syntax. Coming from Ubuntu or Fedora, pamac install, pamac build, pamac update, etc. is much easier than pacman -Ejloo289sao;ig (obviously jk, but still, it’s not convenient to have to hold down shift to type -S, why, just why?)
Apologies for the rant.

2 Likes

Ah, /var/tmp/pamac/dbs/ had a db.lock, thanks for solving that mystery.

As for using what I like, I actually use all of these. pamac only really gets used to do system updates though (because i get tray notifications about system updates from it, and the instinct is to click on 'em)

But WhiteCzar’s explanation for the appeal in pamac is pretty cool too. I can see where he’s coming from.

1 Like

Looks very logical and consistent to me: all main actions/operations use capital switches, lowercase switches modify their behaviour.

2 Likes

Well, I guess it’s logical, but don’t you think it’s a bit inconvenient? Maybe it’s just me, but I’d prefer to use as little capital letters as possible in a terminal. Isn’t that why all the system folders in Linux use all-lowercase?

No.

Oh, but you can:

pacman help for operations
$ pacman --help
usage:  pacman <operation> [...]
operations:
    pacman {-h --help}
    pacman {-V --version}
    pacman {-D --database} <options> <package(s)>
    pacman {-F --files}    [options] [file(s)]
    pacman {-Q --query}    [options] [package(s)]
    pacman {-R --remove}   [options] <package(s)>
    pacman {-S --sync}     [options] [package(s)]
    pacman {-T --deptest}  [options] [package(s)]
    pacman {-U --upgrade}  [options] <file(s)>

use 'pacman {-h --help}' with an operation for available options
1 Like

If you have an aversion to capitals you could use non-abbreviated options like this to update repository packages:

sudo pacman --sync --refresh --refresh --update
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.