Manjaro update error: failed to update core (unable to lock database)
Asked Answered
G

4

6

I am a noob on an i5 desktop. I could not update my system. Terminal reads as follows, after I type and enter "sudo pacman -Syu"

[sudo] password for user-name: ********
:: Synchronizing package databases...
error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
error: failed to update community (unable to lock database)
error: failed to update multilib (unable to lock database)
error: failed to synchronize all databases

Help!!

Glassware answered 2/3, 2020 at 6:8 Comment(0)
G
11

I'm sorry, this is already covered in the wiki...

sudo rm /var/lib/pacman/db.lck

pacman-ArchWiki: "Failed to init transaction (unable to lock database)" error

Glassware answered 2/3, 2020 at 6:16 Comment(2)
for me this file even does not exist! and still it give's me error... what i should to do?Picro
Check your hooks as well — if one of your pacman hooks calls pacman itself, that will also cause this problem.Microhenry
P
2

If you've already deleted /var/lib/pacman/db.lck, like OP posted, and still got the same problem, try this:

sudo rm /var/tmp/pamac/dbs/db.lck
Pittel answered 16/11, 2022 at 4:44 Comment(0)
A
0

This can be solved by quitting Software Update program from task manager. This worked for me.

Allodial answered 16/2, 2021 at 17:32 Comment(0)
R
0

Hit this issue a few times on Manjaro and the answer was never to delete the database lock

  1. sudo rm -r /var/tmp/pamac to delete the temp package manager directory
  2. sudo pacman -Syu to synchronize the repository databases and update system packages
  3. Quit out of the package manager app/GUI and reload. All should be back to normal.
Rowney answered 16/7, 2023 at 9:44 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.