vgremove
Remove LVM volume groups
TLDR
Remove a volume group with confirmation
$ sudo vgremove [volume_group]
Forcefully remove a volume group without confirmation$ sudo vgremove -f [volume_group]
Remove with debug logging$ sudo vgremove -d -d [volume_group]
Remove a volume group matching a select criteria$ sudo vgremove --select '[vg_name=~old_*]'
SYNOPSIS
vgremove [options] volumegroup_...
DESCRIPTION
vgremove removes one or more LVM volume groups. Before a volume group can be removed, all logical volumes within it must first be removed using lvremove.The command updates the LVM metadata to mark the volume group as removed. The underlying physical volumes remain but are no longer associated with any volume group.
PARAMETERS
-f, --force
Force removal without confirmation-d, --debug
Enable debug output (repeat for more detail, up to 6 times)-S, --select string
Select objects for processing based on specified criteria-t, --test
Test mode, don't actually make changes-v, --verbose
Verbose output-y, --yes
Answer yes to all prompts
INSTALL
sudo apt install lvm2
sudo dnf install lvm2
sudo pacman -S lvm2
sudo apk add lvm2
sudo zypper install lvm2
nix profile install nixpkgs#lvm2
CAVEATS
Requires root privileges. All logical volumes must be removed first. Cannot remove an active volume group with mounted filesystems. Data on the volume group will be inaccessible after removal. Part of the LVM2 package.
