2024-03-09 04:09:23 +01:00
# 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?
2024-03-09 04:13:49 +01:00
### Try 0
If you can do this without an error then you are on a good way:
```shell
dnf -y remove --duplicates
```
2024-03-09 04:09:23 +01:00
### Try 1
2024-03-09 04:13:49 +01:00
Well, if try 0 resulted in conflicts, we can try to solve them semi-autotamic:
2024-03-09 04:09:23 +01:00
```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
2024-03-09 04:13:49 +01:00
dnf -y remove --duplicates 2> error.log
2024-03-09 04:09:23 +01:00
```
### Try 2
2024-03-09 04:13:49 +01:00
We end up here if errors after try 1 still remained:
2024-03-09 04:09:23 +01:00
```shell
cat error.log | awk -F 'from install of|conflicts with file from package' '{print $2}' | sort -u | awk 'NF'
```