Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an snapper rm delete all option? #759

Open
DocMAX opened this issue Dec 21, 2022 · 2 comments
Open

Add an snapper rm delete all option? #759

DocMAX opened this issue Dec 21, 2022 · 2 comments

Comments

@DocMAX
Copy link

DocMAX commented Dec 21, 2022

Can we maybe add a little switch to "snapper rm" to delete all snaps at once? (not defineing the exact range with xxx-xxx). Shouldn't take much efford right? Thanks.

@emk2203
Copy link

emk2203 commented Jul 31, 2023

Switch would be nice, I make do at the moment with snpcfgs=( $(sudo snapper --no-headers --csvout list-configs --columns config) ); for snpcfg in ${snpcfgs[@]}; do for i in $(sudo snapper --no-headers --csvout -c $snpcfg list --columns number); do sudo snapper -c $snpcfg delete $i; done; done

to have a clean slate and delete everything but current.

@Chlorophytus
Copy link

I'm thinking about this, an -a/--all flag that is usable on the C++ snapper client.

I'll make it a maintainer editable PR when I'm done so I can get some feedback. This is a little heavy of a change.

Chlorophytus added a commit to Chlorophytus/snapper that referenced this issue Oct 7, 2023
The '-a'/'--all' flag has been added to the Snapper command line's snapshot deletion command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants