Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All



Updated: April 17, 2012

Applies To: Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows Server 2012 R2, Windows Server 2012, Windows 8

Removes a drive letter or mount point from a volume.

For examples of how this command can be used, see Examples.

remove [{letter=<d> | mount=<path> | all}] [dismount] [noerr]




Specifies the drive letter to be removed.


Specifies the mount point path to be removed.


Removes all current drive letters and mount points.


Dismounts the basic volume, when all drive letters and mount points have been removed from the volume, and takes the basic volume offline, making it unmountable. If other processes are using the volume, DiskPart closes any open files in use by an application before dismounting the volume. You can make the volume mountable again by assigning it a driver letter or by creating a mount point path to the volume. Dismount will fail if used on a volume that has any remaining drive letters or mount points. For scripting, using remove all dismount is recommended.


For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

  • If no drive letter or mount point is specified, DiskPart removes the first drive letter or mount point it encounters.

  • The command can be used to change the drive letter associated with a removable drive.

  • You cannot remove the drive letter on a system, boot, or paging volume. In addition, you cannot remove the drive letter for an OEM partition, any GPT partition with an unrecognized GUID, or any of the special, non-data, GPT partitions such as the EFI system partition.

To remove the drive letter K, type:

remove letter=k

To remove G:\MountH, type:

remove mount=G:\MountH

To remove all current drive letters and mount points, and dismount the volumes, type:

remove all dismount
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft