Automated Snapper + grub-btrfs setup for Fedora, including a WAL fix for libdnf5 (DNF5) to ensure proper snapshot rollback after the switch of PackageKit to the DNF5 backend in Fedora 44.
- One-command installation (
./install.sh) - Full Snapper setup for:
- Root (
/) - Home (
/home)
- Root (
- Integration with DNF5 (CLI + GUI)
- Automatic pre/post snapshots for package transactions
- Clean snapshot descriptions:
- CLI → actual command (e.g.
dnf install vim) - GUI → simplified (e.g.
GUI install firefox)
- CLI → actual command (e.g.
- Fix for RPM database inconsistency (SQLite WAL issue)
- grub-btrfs integration for booting into snapshots
- Automatic GRUB updates
- Sensible defaults (no unnecessary home timeline snapshots)
- Tested on:
- Fedora Workstation (GNOME)
- Fedora KDE Spin
Works best with:
- 🌐 How to Setup Fedora 44 with Btrfs Snapshot and Rollback Support
- 📺 Never Break Fedora 44 Again! Complete Snapper & Rollback Guide (YouTube walkthrough)
✔ Full compatibility (including /boot rollback)
⚠️ Note on default Fedora installationsThis setup also works on the default Fedora Btrfs layout.
However:
/bootis not on Btrfs- Kernel rollback is not fully supported
- Snapshots restore the root filesystem, but not
/bootFor full rollback capability, follow the SysGuides setup.
git clone https://github.com/SysGuides/sysguides-snapper-fedora
cd sysguides-snapper-fedora
chmod +x install.sh
./install.shThis setup works with:
- DNF5 command line (
dnf) - GNOME Software
- KDE Plasma Discover
This is possible because Fedora 44 switches PackageKit to the new DNF5 backend built on libdnf5, allowing proper Snapper integration for both CLI and GUI package management.
In this example, we use htop as a sample package and assume the PRE and POST snapshot numbers created are 1 and 2.
This installs the package and automatically creates PRE and POST snapshots.
sudo dnf install htopThis shows the filesystem changes between snapshot 1 (PRE) and snapshot 2 (POST).
snapper status 1..2This reverts all filesystem changes made between those two snapshots.
sudo snapper undochange 1..2This restores only the specific file /etc/hosts from snapshot 2 to the current system, where 0 represents the current live state.
sudo snapper undochange 2..0 /etc/hostsThis is best used when manually testing something important and you want a clean way to revert everything afterward.
This creates a restore point before starting your testing.
snapper -c root create -t pre -c number -d "Pre test"
snapper -c home create -t pre -c number -d "Pre test"Do all your testing.
This creates the matching POST snapshots linked to the PRE snapshots.
snapper -c root create -t post --pre-number <pre-number> -c number -d "Post test"
snapper -c home create -t post --pre-number <pre-number> -c number -d "Post test"This shows all available snapshots for both root and home.
snapper -c root ls
snapper -c home lsThis restores both system files and application/user state back to the previous clean state.
sudo snapper -c root undochange <pre>..<post>
sudo snapper -c home undochange <pre>..<post>- Reboot the system
- From the GRUB menu, boot into the snapshot you want to restore
- Open Btrfs Assistant
- Click Restore / Rollback
This is useful when the system no longer boots correctly or when a full system rollback is needed.