openSUSE / snapper

Manage filesystem snapshots and allow undo of system modifications
http://snapper.io/
GNU General Public License v2.0
917 stars 130 forks source link

Add an snapper rm delete all option? #759

Open DocMAX opened 1 year ago

DocMAX commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.