#!/bin/bash for vol in $( dmsetup ls | grep snapshot | grep cow | awk '{ print $1 }' ) do dmsetup remove $vol done