From b79cde1e9fc35437bdb8c6f74736ad405974f7c3 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 6 May 2024 22:37:40 -0700 Subject: Fix: Recovering from an interrupted pacman upgrade - add remove lockfile step --- src/content/blog/recovering-interrupted-pacman-upgrade.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/content/blog/recovering-interrupted-pacman-upgrade.md b/src/content/blog/recovering-interrupted-pacman-upgrade.md index f8c8efe..5c4975a 100644 --- a/src/content/blog/recovering-interrupted-pacman-upgrade.md +++ b/src/content/blog/recovering-interrupted-pacman-upgrade.md @@ -39,7 +39,14 @@ sudo arch-chroot /mnt and now every command we run will be like as if we were actually on the broken system. -3. Re-install all packages +3. Remove pacman lock file + +We'll want to manually remove the lockfile to allow `pacman` to run. Normally this file is here to prevent multiple instances of pacman from running at once so there isn't any collision between work done (keeping actions atomic). This is removed once the transaction/operation is done, but we're very clearly well beyond that so let's just go ahead and get rid of it. +```bash +sudo rm -rf /var/lib/pacman/db.lck +``` + +4. Re-install all packages Pacman actually maintains a database of what packages it has installed. So we can pipe this information into another pacman command to ask it to re-install everything. -- cgit v1.2.3