![]() | 1 | initial version |
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
to make sure that users still have the same name and ID, otherwise you will run into massive permissions problems./opt
and possibly other stuff in /var
/home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.This guide was created with a little help from answer to question 51259, an AskUbuntu answer and older tips I cannot remember where they came from.
![]() | 2 | No.2 Revision |
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
to make sure that users still have the same name and ID, otherwise you will run into massive permissions problems./opt
and possibly other stuff in /var
/home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.This guide was created with a little help from answer to question 51259, an AskUbuntu answer and older tips I cannot remember where they came from.
![]() | 3 | No.3 Revision |
Preparation
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition.partition. You need to wipe any partition containing the boot manager (/boot
) or the system-managed folders below /usr
. If you have a separate partition for /var
, you probably should wipe it too, the same is true for /etc
.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
to make sure that users still have the same name and ID, otherwise you will run into massive permissions problems./opt
and possibly other stuff in /var
/home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.fixfiles onboot
as root or with sudo to make SELinux relabel all the filesystem on next boot (this will take a while).This guide was created with a little help from answer to question 51259, an AskUbuntu answer and older tips I cannot remember where they came from.
EDIT 1: Added "Preparation" section. Added more details on which partitions to wipe and which to keep. Added step 7 below "Restoring".
![]() | 4 | No.4 Revision |
Preparation
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition. You need to wipe any partition containing the boot manager (/boot
) or the system-managed folders below /usr
. If you have a separate partition for /var
, you probably should wipe it too, the same is true for /etc
.
If you are using LVM, a RAID, a LUKS container or a btrfs multi-disk layout, you do not need to remove these. Just remove and re-create the partitions (or subvolumes in case of btrfs) as described above. If you are using a LUKS container in post-2018, I recommend you remove and regenrate it using the LUKS2 layout for improved security.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
to make sure that users still have the same name and ID, otherwise you will run into massive permissions problems./opt
and possibly other stuff in /var
/home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.fixfiles onboot
as root or with sudo to make SELinux relabel all the filesystem on next boot (this will take a while).This guide was created with a little help from answer to question 51259, an AskUbuntu answer and older tips I cannot remember where they came from.
EDIT 1: Added "Preparation" section. Added more details on which partitions to wipe and which to keep. Added step 7 below "Restoring".
![]() | 5 | No.5 Revision |
Preparation
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition. You need to wipe any partition containing the boot manager (/boot
) or the system-managed folders below /usr
. If you have a separate partition for /var
, you probably should wipe it too, the same is true for /etc
.
If you are using LVM, a RAID, a LUKS container or a btrfs multi-disk layout, you do not need to remove these. Just remove and re-create the partitions (or subvolumes in case of btrfs) as described above. If you are using a LUKS container in post-2018, I recommend you remove and regenrate it using the LUKS2 layout for improved security.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
to make sure that users still have the same name and ID, otherwise you will run into massive permissions problems./opt
and possibly other stuff in /var
/home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.fixfiles onboot
as root or with sudo to make SELinux relabel all the filesystem on next boot (this will take a while).This guide was created with a little help from answer to question 51259, an AskUbuntu answer, the Fedora Wiki and older tips I cannot remember where they came from.
EDIT 1: Added "Preparation" section. Added more details on which partitions to wipe and which to keep. Added step 7 below "Restoring".
![]() | 6 | No.6 Revision |
Preparation
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
or files in /usr/local
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition. You need to wipe any partition containing the boot manager (/boot
) or the system-managed folders below /usr
. If you have a separate partition for /var
, you probably should wipe it too, the same is true for /etc
.
If you are running a multi-boot system, the EFI system partition /boot/efi
should be preserved, unless you are sure it contains nothing coming from other OS installations.
If you are using LVM, a RAID, a LUKS container or a btrfs multi-disk layout, you do not need to remove these. Just remove and re-create the partitions (or subvolumes in case of btrfs) as described above. If you are using a LUKS container in post-2018, I recommend you remove and regenrate it using the LUKS2 layout for improved security.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
, /etc/group
and /etc/passwd
to make sure that users still have the same name and ID, otherwise you will run into massive permissions /opt
, /usr/local
and possibly other stuff in /var
/home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.fixfiles onboot
as root or with sudo to make SELinux relabel all the filesystem on next boot (this will take a while).This guide was created with a little help from answer to question 51259, an AskUbuntu answer, the Fedora Wiki , the user comments below and older tips I cannot remember where they came from.
EDIT 1: Added "Preparation" section. Added more details on which partitions to wipe and which to keep. Added step 7 below "Restoring".
EDIT 2:
Added comment for multi-boot EFI system partition. Add details on /etc/shadow
, /etc/group
, /etc/passwd
. Handle /usr/local
just like /opt
.
![]() | 7 | No.7 Revision |
Preparation
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
or files in /usr/local
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition. You need to wipe any partition containing the boot manager (/boot
) or the system-managed folders below /usr
. If you have a separate partition for /var
, you probably should wipe it too, the same is true for /etc
.
If you are running a multi-boot system, the EFI system partition /boot/efi
should be preserved, unless you are sure it contains nothing coming from other OS installations.
If you are using LVM, a RAID, a LUKS container or a btrfs multi-disk layout, you do not need to remove these. Just remove and re-create the partitions (or subvolumes in case of btrfs) as described above. If you are using a LUKS container in post-2018, I recommend you remove and regenrate it using the LUKS2 layout for improved security.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
, /etc/group
and /etc/passwd
to make sure that users still have the same name and ID, otherwise you will run into massive permissions problems. Note that some of the groups or users may be missing or added on the new installation depending on the packages you installed./opt
, /usr/local
and possibly other stuff in /var
/home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.fixfiles onboot
as root or with sudo to make SELinux relabel all the filesystem on next boot (this will take a while).This guide was created with help from answer to question 51259, an AskUbuntu answer, the Fedora Wiki, the user comments below (most notably @villykruse) and older tips I cannot remember where they came from.
EDIT 1: Added "Preparation" section. Added more details on which partitions to wipe and which to keep. Added step 7 below "Restoring".
EDIT 2:
Added comment for multi-boot EFI system partition. Add details on /etc/shadow
, /etc/group
, /etc/passwd
. Handle /usr/local
just like /opt
. .
![]() | 8 | No.8 Revision |
Preparation
Backup
First, you need to carefully make a backup.
rpm -qa
) just in case.¹dnf leaves
using the dnf leaves plugin). This will be needed later if you want to reinstall all the extra packages you've installed before.¹dconf dump /
as their user ID.¹/etc
. Do this as root or with sudo because otherwise you will be missing important files due to missing permissions. This will backup system-wide configuration.²systemctl list-unit-files | grep enabled
.¹/opt
or files in /usr/local
, make a backup too.²/var
too. This is not normally needed.rpm -Va
. Have a look at this list as it will contain all files which differ from package defaults. This is especially important for config files which may reside outside of /etc
, but also for permissions./home
.³ If it is on a separate partition, take an image, e.g. by using GNOME disks or dd
(dangerous). If it is not on a separate partition, consider putting it on a separate partition as this will ease future reinstallations. If you don't have a separate partition, then carefully back-up your /home
and store it useing tar
or cp -a ...
to ensure the permissions of all files remain unchanged when you restore.¹: Do this from the currently running system or through a chroot environment from a live image. ²: Do this either from the currently running system or a live image. ³: Do this from a live image, not from the running system! Otherwise file modifications will be lost. You may also get problems with permissions.
Fedora installation
Boot from any installer media and do a full installation, wiping the root partition. You do not have to wipe a separate /home
partition. You need to wipe any partition containing the boot manager (/boot
) or the system-managed folders below /usr
. If you have a separate partition for /var
, you probably should wipe it too, the same is true for /etc
.
If you are running a multi-boot system, the EFI system partition /boot/efi
should be preserved, unless you are sure it contains nothing coming from other OS installations.
If you are using LVM, a RAID, a LUKS container or a btrfs multi-disk layout, you do not need to remove these. Just remove and re-create the partitions (or subvolumes in case of btrfs) as described above. If you are using a LUKS container in post-2018, I recommend you remove and regenrate it using the LUKS2 layout for improved security.
Restoring configuration
dnf leaves
above and reinstall all the packages you may still need.rpm -Va
and your backup of /etc
, restore configuration for some of the software installed. Using a diff tool such as vimdiff
(not that easy to learn) or meld (not suitable for root access) may help you. Systemd units need special handling: You can enable/disable them through systemctl
creating the symlinks instead of creating them by hand. It is important to restore files like /etc/shadow
, /etc/group
and /etc/passwd
to make sure that users still have the same name and ID, otherwise you will run into massive permissions problems. Note that some of the groups or users may be missing or added on the new installation depending on the packages you /opt
/usr/local
/var
if necessary./home
is on a separate partition, modify /etc/fstab
accordingly to mount it, then reboot. If /home
is not on a separate partition, restore the contents of /home
from your backup. It is very important that you do this step after restoring /etc/shadow
.fixfiles onboot
as root or with sudo to make SELinux relabel all the filesystem on next boot (this will take a while).This guide was created with help from answer to question 51259, an AskUbuntu answer, the Fedora Wiki, the user comments below (most notably @villykruse) and older tips I cannot remember where they came from.
EDIT 1: Added "Preparation" section. Added more details on which partitions to wipe and which to keep. Added step 7 below "Restoring".
EDIT 2:
Added comment for multi-boot EFI system partition. Add details on /etc/shadow
, /etc/group
, /etc/passwd
. Handle /usr/local
just like /opt
.