Hi there I installed Fedora 42 by error how to remove it and leave just the 41 version? Thanks
AFAIK you cannot. A downgrade of the installed version is not supported and it usually requires a reinstall.
You can downgrade Fedora 42 to Fedora 41 like this:
sudo dnf swap fedora-repos-rawhide fedora-repos --releasever=41
sudo dnf distro-sync --releasever=41 --allowerasing --offline
sudo dnf offline reboot
sudo dnf remove kernel\*-6.12.\*
Thank you! You saved my day!
I tried today (April 2025) to downgrade from 42 to 41.
I used the commands given, ommiting the change from rawhide to fedora-repos, as the Fedora repos were already the active one at this time.
When the download finished and the transaction was tested, it failed as a bunch of the 41 files conflicted with the 42 files.
Output:
Testing offline transaction
Transaction failed: Rpm transaction failed.
- file /usr/bin/tclsh8.6 from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/lib64/libtcl8.6.so from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/auto.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/clock.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/encoding/koi8-u.enc from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/history.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/http1.0/http.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/init.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/opt0.4/optparse.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/opt0.4/pkgIndex.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/package.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/safe.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/tclIndex from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8.6/tm.tcl from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8/8.4/platform/shell-1.1.4.tm from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8/8.5/msgcat-1.6.1.tm from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/share/tcl8/8.6/http-2.9.8.tm from install of tcl-1:8.6.14-5.fc41.x86_64 conflicts with file from package tcl8-1:8.6.15-10.fc42.x86_64
- file /usr/bin/wish8.6 from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/lib64/libtk8.6.so from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/lib64/tk8.6/pkgIndex.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/console.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/demos/cscroll.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/demos/spin.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/demos/widget from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/tclIndex from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/tk.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/altTheme.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/aquaTheme.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/clamTheme.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/classicTheme.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/combobox.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/defaults.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/panedwindow.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/scrollbar.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/sizegrip.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/ttk.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/utils.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/vistaTheme.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/winTheme.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/share/tk8.6/ttk/xpTheme.tcl from install of tk-1:8.6.14-2.fc41.x86_64 conflicts with file from package tk8-1:8.6.15-5.fc42.x86_64
- file /usr/bin/systemd-sysusers from install of systemd-256.12-1.fc41.x86_64 conflicts with file from package systemd-sysusers-257.5-2.fc42.x86_64
- file /usr/share/man/man5/sysusers.d.5.gz from install of systemd-256.12-1.fc41.x86_64 conflicts with file from package systemd-sysusers-257.5-2.fc42.x86_64
- file /usr/share/man/man8/systemd-sysusers.8.gz from install of systemd-256.12-1.fc41.x86_64 conflicts with file from package systemd-sysusers-257.5-2.fc42.x86_64
So I could not sudo dnf offline reboot, and the 4GB download was not stored (I’m on a limited connection is why I mention that).
That instruction was tested when F42 was still rawhide, so it’s not surprising that something no longer works.
You can as well enable persistent DNF cache and downgrade interactively from a live session with a custom installroot, which should be easier to troubleshoot.