pacman Failed to Update Core – How to Fix

2 min


This quick guide helps you to fix the common pacman failed to update core error in Arch Linux, Manjar, and other Linux.

pacman is a package manager used primarily in Arch Linux based distributions. It is used in vanilla Arch Linux, Manjaro as well. If you use Arch Linux a lot you must have encountered the following errors and already know how to fix them. However, this quick guide is for beginners who are not aware of the problem and why it happens, with a fix as well.

This guide fixes the following errors

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)
pacman failed to update core error
pacman failed to update core error

Why and when pacman Failed to Update Core occurs

This error comes when you run pacman to update or sync your system by running commands like pacman -Syy or pacman -Syu.

When pacman starts to alter the package database during sync or installation it creates a lock file at /var/lib/pacman/db.lck. This lock file prevents any other pacman instance or applications from accessing the package database by creating an exclusive lock.

Trouble arises when you interrupt pacman midway, via a reboot, shutdown, or any other event. The commands not abe to complete and release the lock. So next time you attempt to access the package database the lock file prevents it.

remove the lock file
remove the lock file

How to Fix

The fix is super easy. However, it requires root or admin privileges. Open a terminal and run the below command to manually remove the file.

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

Once done, you can safely perform the pacman command which caused the error.

pacman success
pacman success

That’s it. I hope this quick tip helps you to fix the error.

SEE ALSO:   How to Install Animated Plymouth in Arch Linux

We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.

Also Read


Like it? Share with your friends!

Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x