• warning: lock file missing /var/lib/pacman/db.lck


    I was wondering what could cause the above message and what I can do to fix it. It occurs intermittently when running “pacman -Syu” at the commandline. I’m not sure if there’s a relationship with this and running pamac just before opening a terminal.

    I’ve only seen this message since recently installing Antergos, I never saw it with “Vanilla Arch” but then I never used pamac before either, and am I wondering if this is a true pacman problem or something that pamac causes and which pacman cannot fix when run in the terminal. I’m not sure why it’s intermittent, perhaps it’s affected by logging out/rebooting.

    As a warning it doesn’t prevent me from doing anything, but if it’s something I can fix (even by just not using pamac), then I’d like to :)

    I just rebooted, opened a terminal and ran pacman, and the warning was gone. Then I immediately ran the pamac updater, then ran pacman in the terminal again, and then the warning showed up again. I guess pamac is removing the lock, but I don’t understand why pacman is not reinsating the lock if it requires a lock. I know in the past on “Vanilla Arch” I’ve had to manually remove a lock myself (possibly after an unclean exit of pacman in the terminal by me), but thereafter I don’t recall ever seeing a warning about a missing lock file (perhaps I just didn’t run pacman again before a reboot, not sure).

  • I’m not sure if there’s a relationship with this and running pamac just before opening a terminal.

    That’s just what is happening… it’s an old pamac bug. You can just check that pamac is not installing anything and delete that file yourself (if you don’t use pamac, feel free to uninstall it ;)).


  • Thanks for your reply. I’m sorry for any confusion, but pamac does seem to be leaving a file for me to delete (which is the scenario I am more familiar with prior to using pamac), but instead pamac itself seems to be removing the file, and then pacman complains that the file is missing, rather than present.

    I’ll go ahead and close this topic since it’s a pamac bug :) … oops I don’t see a way to mark it as solved in either the “Topic Tools” or “Edit” areas

  • Hi!
    Like @karasu says you only have to remove the lock file of pacman. Make sure that none application is running pacman (such as the software manager).
    For remove it you only have to run this command at the terminal:
    sudo rm /var/lib/pacman/db.lck
    Do not be afraid of pacman, in my opinion is one of bests packages manager in Linux [Personal opinion]

  • Hi @gaolapo,

    I’m not sure how I’m failing in explaining things (or possibly misunderstanding), but there seems to be no file to remove – and that is why pacman complains. I’ve removed the lock manually myself before I ever used Antergos (I was using Vanilla Arch in the past); the warning that it has been removed, already, by something else (pamac), is something new for me entirely :)

    (And it’s only the need to remove it that I’ve ever seen documented on the web, I’ve never seen an instance addressing the warning that it was already removed.)

  • @taliesin

    Wow! And here went my English reading capabilities!

    I think pamac programmers might have screwed up. They tried to fix a bug where sometimes pamac left the lock created, so then pacman or other utilities didn’t work. Therefore, now they are deleting this lock, but the lock is also created by pacman, so deleting it they’re deleting the real pacman lock, not the one created by using pamac.

    Well, that last paragraph was better in my head, but I suppose you understand what I meant.

    My recommendation is to use either pacman or pamac, but not both.


  • This seems like it might’ve been resolved in the latest (2.4) pamac.

  • Thanks for sharing!

  • For what it’s worth, I have a vanilla Arch install with a Gnome DE.
    Yesterday I wanted to try Pamac and all seemed fine, until today, while updating in the terminal I received the same error. The db.lock file was missing, usually it is in the way. ;)

  • Ok, Hi think that The problem is the internet connection Because I try to use My hotspot wi-fi phone with my 4G Plan. is faster than my ADSL.
    change the DNS also using Google DNS and try to install again. Everything Works fine now

  • this is a very old topic, i’m closing it, if you need you’re free to open a new thread in the forum.

pacman122 pamac70 Posts 11Views 8764
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.