Protecting Your Fedora System with Btrfs Snapshots and dnf-system-rollback
Fedora’s Btrfs default filesystem lets you roll back the entire OS state in seconds. Learn how to verify the subvolume layout, take manual snapshots, use dnf-system-rollback, and handle disk-space trade-offs in this practical guide.
07 May 2026, 07:36 UTC

The Problem: Broken Updates on Fedora
When a package update introduces a dependency conflict or a buggy driver, you can end up with an unusable system. Traditional Linux distributions rely on manual backups or third-party tools to recover. Fedora’s move to Btrfs as the default filesystem in version 33 gives you a built-in, near-instant recovery mechanism that works out of the box.
Thesis: Snapshots + dnf-system-rollback = Instant, Reliable Rollback
Fedora’s engineering decision to place the root filesystem on a Btrfs subvolume and to enable dnf-system-rollback means you can roll back the entire OS state to a previous snapshot in seconds, without any manual cleanup. This blog walks through how the feature works, how to use it, and what caveats to keep in mind.
1. How Fedora Builds the Root Subvolume
During installation, Fedora creates a single Btrfs partition and sets up subvolumes for the operating system and user data. Because all subvolumes share the same storage pool, the pool automatically grows as you add data, removing the need for manual partition resizing.
Verify the Subvolume Layout
Run this on a freshly installed system to confirm the structure:
# sudo btrfs subvolume list /
Look for subvolume entries in the output. If the list is empty, the root filesystem may not be on Btrfs.
2. Taking a Manual Snapshot Before a Big Change
While dnf system-rollback automatically creates snapshots before each transaction, you can create one manually to guard against an unexpected update:
# sudo btrfs subvolume snapshot -r / /snapshots/backup_before_update
Flags explained:
- -r – creates a read-only snapshot, preserving the exact state.
- Run as root or with sudo to access the root subvolume.
After the snapshot, you can perform your update and still have a fallback.
3. Performing an Update and Rolling Back if Needed
Update normally:
# sudo dnf upgrade
During the transaction, the system creates a snapshot. If the update fails or introduces issues, you can list available snapshots:
# sudo dnf system-rollback list
Choose the snapshot you want to revert to and run:
# sudo dnf system-rollback 2026-10-15-12-30-00
Replace the timestamp with the snapshot name from the list. The system will reboot into the previous state. No manual file copying or reinstallation is required.
Checking the Result
After reboot, verify you’re on the older snapshot by checking the kernel version or a package you know was updated:
# uname -r
# rpm -q kernel
If the output matches the pre-update state, the rollback succeeded.
4. Trade-offs and Limitations
- Disk Space Usage: Snapshots are incremental, but over time they can consume significant space. Use
sudo btrfs filesystem df /to monitor usage and prune old snapshots withsudo dnf system-rollback delete <snapshot>. - Write-Heavy Workloads: Btrfs’ copy-on-write can degrade performance for databases or VM images. If you run such workloads, consider moving them to a different filesystem or disabling CoW on specific directories.
- Backup vs. Rollback: Snapshots are great for rollback but not a substitute for off-site backups. Keep regular external backups for data safety.
5. Actionable Checklist for Fedora Users
- Confirm your root is on Btrfs:
sudo btrfs subvolume list /. - Before a major update, create a manual snapshot:
sudo btrfs subvolume snapshot -r / /snapshots/pre_update. - Run
sudo dnf upgradeas usual. - If problems arise, list snapshots:
sudo dnf system-rollback list. - Rollback:
sudo dnf system-rollback <snapshot>. - After rollback, prune old snapshots:
sudo dnf system-rollback delete <old_snapshot>.
By following this workflow, you harness Fedora’s Btrfs snapshot capability to keep your system resilient without extra tooling.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.