1.0 KiB
Purpose
You may find that you need to delete shadow copies on a disk for any number of reasons such as freeing up space. Sometimes the shadow copies simply don't want to be deleted gracefully. In those circumstances, you can use the two methods seen below to delete the shadows.
!!! warning
These commands will delete all shadow copies for the associated drive letter. In these examples, the drive letter will be D:\
.
Delete Shadows Via vssadmin
Vssadmin is generally the de-facto method of deleting shadows, as it is pretty graceful with the process, but sometimes antivirus might not let you run it thinking you are doing something ransomware-ish. If that happens, defer to the diskshadow
method seen further below.
vssadmin delete shadows /for=D: /all /quiet
Delete Shadows via diskshadow
This method is a little more aggressive than vssadmin
and should be only used as a Plan B if vssadmin
doesn't work.
diskshadow
set context persistent nowriters
delete shadows volume D:
exit