Introduction to lvremove command
lvremove command removes logical volumes in the volume group. lvremove asks for confirmation before removing any active logical volume. The removal of logical volume will also remove its dependent snapshots.
Are you new to LVM and still learning how it works?
We have written detailed articles covering different areas of managing logical volumes, which you can follow using the below links:
Manage Logical Volume in Linux - One STOP Solution
Understand LVM Architecture
Create LVM during installation RHEL/CentOS 7/8
How to use LVM Snapshot for Backup and Restore
Create Mirrored Logical Volume
Create Striped Logical Volume
Syntax for lvremove command
The syntax for lvremove command is as follows:
$ sudo lvremove option LVDifferent examples to use lvremove command
1. Remove the logical volume in the volume group
You can use lvremove command to remove the specified logical volume in
the volume group.
For example, the following command removes the logical volume lvol1 in
the volume group vol_grp.
$ sudo lvremove vol_grp/lvol1Sample Output:
It asks for confirmation before removing any active logical volume.

umount
command to unmount the mount point.2. Remove the logical volume without confirmation
The -f or --force option of lvremove command removes active logical
volumes without asking for confirmation.
$ sudo lvremove -f vol_grp/lvol2OR
$ sudo lvremove --force vol_grp/lvol2Sample Output:

3. Remove all logical volumes in the volume group
If you specify only the volume group name as an argument to lvremove
command, it removes all logical volumes in that volume group.
This command removes all logical volumes in the volume group vol_grp.
$ sudo lvremove vol_grpSample Output:

4. Remove logical volume that contains a filesystem in use
Sometimes, when removing a logical volume, you might get the error saying "filesystem in use".
golinux@ubuntu-PC:~$ sudo lvremove vol_grp/lvol6 Logical volume vol_grp/lvol6 contains a filesystem in use.
In that case, check if the logical volume is mounted in the system.
golinux@ubuntu-PC:~$ sudo mount | grep lvol6
/dev/mapper/vol_grp-lvol6 on /golinux type ext3 (rw,relatime)If it is mounted, you have to unmount the mount point.
golinux@ubuntu-PC:~$ sudo umount /golinuxThen you can remove the logical volume using the lvremove command.
golinux@ubuntu-PC:~$ sudo lvremove vol_grp/lvol6
Do you really want to remove and DISCARD active logical volume vol_grp/lvol6? [y/n]: y Logical volume "lvol6" successfully removed
Conclusion
This article teaches you to use lvremove command for removing logical volumes in the Linux system. It is one of the useful commands to manage logical volumes in the volume group. If you have any queries, please let us know in the comment section below.
What's Next
10+ lvcreate command examples in Linux Cheat Sheet
vgcreate command examples in Linux Cheat Sheet

![lvremove command examples in Linux [Cheat Sheet]](/lvremove-command-in-linux/lvremove__command-800w.webp)
![15+ Tips to PROPERLY sort files in Linux [Cheat Sheet]](/linux-sort-files/sort_command_hu_f153d60b2b55d5b6.webp)
![9 screen command Examples in Linux [Cheat Sheet]](/screen-command-in-linux/screen_command-1_hu_5e60e89880f98ac2.webp)
![Increase load with stress command in Linux [Cheat Sheet]](/stress-command-in-linux/stress_command_hu_7b5119be5f0060f4.webp)

![10+ traceroute command in Linux [Cheat Sheet]](/traceroute-command-in-linux/traceroute_command_hu_9e60fd6575e1c7c2.webp)
![10+ tcpdump command examples in Linux [Cheat Sheet]](/tcpdump-command-in-linux/tcpdump_command_hu_28e7fff8995c4ce8.webp)

![10+ mke2fs command examples in Linux [Cheat Sheet]](/mke2fs-command-in-linux/mke2fs_command_hu_e526d401d8929c5.webp)