From 0b04aa5c205d7b937820a3d3b500292d10cb5dda Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Sat, 9 Mar 2024 04:13:49 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- admin/linux/fedora_dnf/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/admin/linux/fedora_dnf/README.md b/admin/linux/fedora_dnf/README.md index f2a95b3..fbca084 100644 --- a/admin/linux/fedora_dnf/README.md +++ b/admin/linux/fedora_dnf/README.md @@ -8,17 +8,28 @@ Let us assume the dnf update inbetween. You lost the remote connection to the co Now you are stuck in dnf limbo. How to get out of it with less effort as possible? +### Try 0 + +If you can do this without an error then you are on a good way: + +```shell +dnf -y remove --duplicates +``` ### Try 1 +Well, if try 0 resulted in conflicts, we can try to solve them semi-autotamic: + ```shell dnf -y remove --duplicates 2> error.log cat error.log | awk -F 'from install of|conflicts with file from package' '{print $2}' | sort -u | awk 'NF' | sed s/"^ "/"dnf -y reinstall "/g | sh +dnf -y remove --duplicates 2> error.log ``` ### Try 2 +We end up here if errors after try 1 still remained: + ```shell -dnf -y remove --duplicates 2> error.log cat error.log | awk -F 'from install of|conflicts with file from package' '{print $2}' | sort -u | awk 'NF' ```