LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

virsh-snapshot-delete

delete a libvirt domain snapshot

TLDR

Delete a named snapshot
$ virsh snapshot-delete [domain] [snapshot]
copy
Delete the current snapshot
$ virsh snapshot-delete [domain] --current
copy
Delete a snapshot and its children
$ virsh snapshot-delete [domain] [snapshot] --children
copy
Delete only children, keep this snapshot
$ virsh snapshot-delete [domain] [snapshot] --children-only
copy
Remove libvirt metadata only (leave disk snapshot files)
$ virsh snapshot-delete [domain] [snapshot] --metadata
copy

SYNOPSIS

virsh snapshot-delete domain {snapshot | --current} [--metadata] [{--children | --children-only}]

DESCRIPTION

virsh snapshot-delete removes a snapshot from a domain. If the snapshot has children and you do not pass --children / --children-only, libvirt merges this snapshot's changes into the children so the remaining tree stays consistent.Without --metadata, deleting a snapshot also drops the data for that point in time (internal snapshot content or managed files). With --metadata, only libvirt's record is removed.This is a virsh subcommand, not a separate binary.

PARAMETERS

snapshot | --current

Snapshot to delete, or the domain's current snapshot.
--children
Also delete descendant snapshots. Mutually exclusive with --children-only.
--children-only
Delete descendants but keep this snapshot.
--metadata
Delete only libvirt's snapshot metadata; leave the underlying snapshot data for other tools.

INSTALL

sudo apt install libvirt-clients
copy
sudo dnf install libvirt-client
copy
sudo apk add libvirt-client
copy
sudo zypper install libvirt-client
copy

CAVEATS

Destructive: snapshot contents are gone unless you used --metadata or an external file you keep. Deleting the current snapshot moves "current" to a parent or another snapshot. External qemu snapshots can leave backing-file chains that qemu-img still needs to manage. Needs libvirtd access, usually with privileges to change storage.

HISTORY

Part of libvirt snapshot support in virsh.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid