Run dnf inside a tmux or a screen. Then if the desktop session becomes unstable due to the files changing underneath it, a crash of the desktop session will not take down the terminal and the dnf running in it.