Skip to content

About

A cleanup script that works with snapper-rollback.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

snapper-cleanup

A cleanup script that works with snapper-rollback to clean up temporary Btrfs subvolumes.

Installation

To install the script, move it to /usr/local/bin and make it executable:

sudo mv snapper-cleanup /usr/local/bin/
sudo chmod +x /usr/local/bin/snapper-cleanup

Configuration

Before running the script, open it and configure the following variables according to your system setup:

  • DEVICE: The Btrfs partition device path (e.g., /dev/nvme0n1p2).
  • MOUNT_POINT: A temporary mount point directory (e.g., /mnt/temp_top).
  • MATCH_PATTERN: The pattern matching the temporary subvolumes to be deleted (e.g., @rootfs20*).

Usage

Run the script with root privileges:

sudo snapper-cleanup

Compatibility & Testing

This script has been tested and is personally used on Debian 13.

If you are using other non-Debian-based platforms, please review the script logic before running it to ensure there are no compatibility issues with your system.

About

A cleanup script that works with snapper-rollback.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages