From f6db7c347b08fd653cdc891b74519d79316d8cf3 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Sat, 9 Mar 2024 04:09:23 +0100 Subject: [PATCH] Create README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- admin/linux/fedora_dnf/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 admin/linux/fedora_dnf/README.md diff --git a/admin/linux/fedora_dnf/README.md b/admin/linux/fedora_dnf/README.md new file mode 100644 index 0000000..f2a95b3 --- /dev/null +++ b/admin/linux/fedora_dnf/README.md @@ -0,0 +1,24 @@ +# When dnf fails. + +## Top + +Questions to [David Rotermund](mailto:davrot@uni-bremen.de) + +Let us assume the dnf update inbetween. You lost the remote connection to the computer where the update was running or systemd oom killed the dnf task. + +Now you are stuck in dnf limbo. How to get out of it with less effort as possible? + + +### Try 1 + +```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 +``` + +### Try 2 + +```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' +```