From c373a2fc467ae844d9cb1470697e82137ae08855 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Sat, 9 Mar 2024 04:42:05 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- admin/linux/fedora_dnf/README.md | 34 +++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/admin/linux/fedora_dnf/README.md b/admin/linux/fedora_dnf/README.md index bd531ca..31978a2 100644 --- a/admin/linux/fedora_dnf/README.md +++ b/admin/linux/fedora_dnf/README.md @@ -14,7 +14,7 @@ systemctl disable --now systemd-oomd Now you are stuck in dnf limbo. How to get out of it with less effort as possible? -### Try 0 +## Try 0 If you can do this without an error then you are on a good way: @@ -22,7 +22,7 @@ If you can do this without an error then you are on a good way: dnf -y remove --duplicates ``` -### Try 1 +## Try 1 Well, if try 0 resulted in conflicts, we can try to solve them semi-autotamic: @@ -32,7 +32,7 @@ cat error.log | awk -F 'from install of|conflicts with file from package' '{prin dnf -y remove --duplicates 2> error.log ``` -### Try 2 +## Try 2 We end up here if errors after try 1 still remained: @@ -79,4 +79,32 @@ Now we should be able to do this: dnf -y remove --duplicates ``` +## Finalize +Now we can finalize the repair with: + +```shell +yum -y update --best --allowerasing --skip-broken +``` + +or + +```shell +yum -y --enablerepo=* update --best --allowerasing --skip-broken +``` + +Depending on if you want to include other non-default repos from your repo-list. + +## Proteced packages + +If you get complaints about protected system packages, you can disable this protection by: + +```shell +mv /etc/dnf/protected.d /etc/dnf/protected.d_xxx +``` + +However, you should restore the protection later: + +```shell +mv /etc/dnf/protected.d_xxx /etc/dnf/protected.d +```