Dell Data Wipe and DiskPart

Use of Dell Data Wipe or DiskPart to Remove a Partition Table on a Drive for Windows Installation


Windows Setup Problems

The Windows Setup has the ability to "delete" partitions however it does not have the ability to "delete" a partition table on the drive. In some cases the Windows Setup will struggle to recognize the file system when a Linux distribution has previously been installed or a different file system has been used for example when the Windows installation media is setup for a UEFI BIOS with Secure Boot and the drive previously had a Windows installation setup for a Legacy Boot. In such a case the Drive has a MBR Partition Table and the Windows Installation Media is setup for use of the GPT partition table. Typically you will get the following error message:

Windows cannot be installed to this disk. The selected disk has an MBR partition table. One EFI systems, Windows can only be installed to GPT disks.

It is also possible to have the problem in reverse, particularly if installing 32 Bit Windows. Typically you will get the following error message:

Windows cannot be installed to this disk. The selected disk is of the GPT partition style.

This may also address the following error however the following error more commonly displays as a result of corrupt installation media or if the installation media lacks the storage controllers required to read the internal drive. This was common with Windows 7 installation media as Microsoft never incrementally updated the installation media with driver support:

We couldn't create a new partition or locate an existing one. For more information, see the Setup log files

The partition table can be removed and the drive can be wiped using a Data Wipe Routine embedded in the Systems UEFI BIOS Setup for newer systems or via DiskPart, a command line based utility incorporated into the Windows Installation Media. The data wipe routine for DiskPart is pretty dated and is designed only for mechanical HDDs, if wishing to Wipe a SSD and your system doesn't have a Data Wipe Routine Embedded in the UEFI BIOS Setup, you may consider using Parted Magic.

Creating a Windows Bootable USB

To reinstall Windows (or to Launch DiskPart) you will need an up to date Windows Bootable USB.

It is generally recommended to use a Windows 10 or Windows 11 Bootable USB as these OS have up to date Storage Controllers allowing one to use DiskPart on more drive types. Windows 7 DiskPart may not work on 4th-6th Generation Intel Systems due to a lack of Storage Controllers.

Data Loss

Using an OEM Data Wipe Routine will proceed in data loss. Do not carry out this procedure if you have important data not backed up on your drive.

Dell Data Wipe

Dell has responded to the industrial demand for data wiping and have incorporated the Dell Data Wipe procedure within the Dell UEFI BIOS Setups. Dell Data Wipe, wipes data at the hardware level opposed to the software level.

Entering the Dell UEFI BIOS Setup

Insert your Windows Bootable USB. To enter the Dell UEFI BIOS Setup, Power Up your Dell and press [F2]:

System Information

Expand General to the left hand side and highlight System Information:

Dell Data Wipe is available on all Dell Business Models (XPS, OptiPlex, Latitude, Precision) Manufactured from Late 2015. The Date of Manufacture is shown in System Information. If it is manufactured before 2015, you won't have Dell Data Wipe but should review some of the additional UEFI BIOS Settings before using DiskPart.

In the following screen you should also observe the BIOS Version. It is recommended to update your BIOS Version to the Latest Version Available on the Dell Website as newer BIOS Versions address issues found with Dell Data Wipe:


Under System Configuration, select SATA Operation. Makes sure it is set to AHCI which is the setting used when each Drive in the system acts as an independent drive. This is important when it comes to using a third-party utility such as DiskPart as we will need to access each drive individually to clean it.

Selecting Drives to the left hand side will give you details about your Drives. In most cases you will only have a single drive for example in my case I have a 128 GB SSD.

In the early days of SSDs, where the price per GB was extremely high. Some systems had a 16-64 GB SSD Cache Drive and a 500 GB-2 TB HDD. For this configuration these systems would have an additional SATA operation called Intel Smart Response Technology (or similar). To use DiskPart on these two separate drives make sure the SATA Operation is set to AHCI. If your system drives are easy to access it is recommended to remove both drives and replace them with a high capacity SSD.

Boot Options

Select Boot Sequence and uncheck your Windows Bootable USB:

Select Delete Boot Option to Delete all Old Boot Entries:

Now only your Windows Bootable USB should display:

Dell Data Wipe

Look for Dell Data Wipe under Maintenance. If it doesn't exist your system is too old to have Dell Data Wipe. Apply the Changes in your UEFI BIOS Setup and proceed to using DiskPart instead.

We can use the Dell Data Wipe Setting to Securely Erase all Internal SSDs. Select Dell Data Wipe and then Wipe on the Next Boot:

Select OK at the warning:

Select No at the Warning:

Apply Settings

Once you have Applied your UEFI BIOS Settings, select Apply:

Then select OK:

Then select Exit:

Dell Data Wipe Routine

The Computer will reboot and the Dell Data Wipe routine will be initiated:

Select Continue:

Select Erase:

The internal drives will be wiped:

  • In the case of SSDs, the drive manufacture have incorporated the means of securely wiping a SSD by use of a voltage spike which Dell Data Wipe initiates. This data wiping procedure is fast as it Wipes all the Cells in a SSD simultaneously and because of the Fast Access Time of a SSD.
  • HDDs were designed without a Data Wipe Procedure incorporated into them. Therefore only a rudimentary Data Wipe Procedure is carried out in a HDD where each byte on the HDD is written to 0 sequentially. Due to the combination of the slow access time of a HDD and sequential writing this Data Wipe Procedure takes Several Hours and is essentially an overnight job.

The progress bar will indicate the progress of the Data Wipe:

You will be informed when the Data Wipe is complete. Select OK:

Your system will reboot:

You will be informed that the Data Wipe was successful. Hold down the Power Button to turn off your PC:

Power down your Dell. Then begin the Windows Installation from the Bootable USB.


Power up your Dell and press [F12] to get to the UEFI BIOS Boot Menu:

Ensure that the Boot Mode is set to UEFI and Secure Boot is ON. Select your Windows Bootable USB:

You will see the Dell loading logo:

On the next screen you will be given language installation options. Select next:

DiskPart is a command prompt based utility. The command line can be accessed by pressing [Shift] + [F10].

Alternatively select Repair your Computer:

Select Troubleshoot:

Select Command Prompt:

To the top it will state X:\sources which means it is running from the Bootable USB which is asigned the drive letter X:\

Type in:


Diskpart will launch, you will see the version of your Windows installation media:

Next type in:

list disk

A number of disks will display. You will have to judge what disk is what by using the file sizes. In this case Disk 0 is ~250 GB and is the internal SSD and Disk 1 is ~8 GB and is the Bootable USB.

Since my internal drive is disk 0, I will type in:

select disk 0

Amend the disk number if required.

The disk will be selected:

There are two commands which can now be used.

The command clean removes the partition table and all partitions on the drive. Think of your drive as a field where your data is a set of crops enclosed by fences or partitions. When the partitions are removed all the crops remain in place. The space the crops occupied is designated as free space but the crops are still present. If no subsequent drive operations are carried out the crops or data can be recovered using third party utilities.


Because only the partition table is removed this is carried out very rapidly.

DiskPart also has a rudimentary Data Wipe Routine however this Data Wipe Routine was never optimized for a SSD (see note below) and is only recommended for use on a HDD:

clean all

This command removes the partitions like clean does and then performs a data wipe. Returning to the field analogy it is equivalent of driving a mower along the field and removing all the crops. Data is present in binary form, a series of 0s and 1s. Clean All replaces all data on the drive with 0s so this procedure is also known as zeroing the drive. DiskPart uses a rudimentary algorithm that sequentially goes along the drive from start to finish replacing each bit of data with a 0. As a result this will take a long time. This data wiping technique is optimal for hard drives which operate this way but not for solid state drives.

You can now Close Down the Command Prompt and Exit the Windows Setup. If you have changed your SATA Configuration to AHCI and want to use a SSD Cache Drive and HDD, revert the changes in the UEFI BIOS Setup before installing Windows.

Power down your Dell. Then begin the Windows Installation from the Bootable USB.

SSD and Clean All Data Wipe Routine

Note: it is better to use a Data Wipe routine designed for a SSD on a SSD due to the speed of wiping each cell collectively instead of individually and due to the fact that it is less intensive on a SSD.

SSDs have limited write cycles, the SSD Endurance of a Crucial BX500 for example is specified by Crucial to be 360 TB meaning 360 TB of data can be written to the SSD before it begins to fail. Using diskpart clean all will intensively write 0s to each cell of the SSD. If for arguments sake the SSD is a 1 TB SSD, then clean all (1 pass) will write 1 TB of data to it albeit all the data will be zeros. Therefore running clean all (360 passes) on a BX500 SSD may bring the SSD towards the end of its life cycle.

The SSD Drive manufacturers Crucial, WD and Samsung have Data Wipe Routines in their SSD utilities… However their SSD Drive utilities are normally Windows Only Applications and the SSD to be wiped has to be connected internally to the Computer via an additional SATA Port or M.2 Slot… This means that in the majority of cases where the computer only has a single drive, the SSD Data Wipe Utility cannot be used. One general use UEFI Bootable USB Utility that can perform a SSD Data Wipe is Parted Magic.

Lenovo Data Wipe

Lenovo has also responded to the industrial demand for data wiping and have incorporated a Data Wipe procedure within the Security Tab of their UEFI BIOS Setup. The Lenovo implementation of it isn't quite as straight forward and requires the user to first setup a drive password before it allows them to perform a Data Wipe routine of the Drive.

Power up your Lenovo and press [F1] to get to the UEFI BIOS Setup.

You will be on the main tab by default. Press [→] until you get to Security then press [↵]:

Select Hard Disk Password. Although Lenovo call these settings "Hard Disk" they also relate to Solid State Drive.

Press [↓] until you get to (Hard Disk) Drive Password and press [↵]:

In this screen look for Security Erase (HDD) Data. If you do not have this option, your system may be too old to support Data Wipe from the UEFI BIOS and you will have to use a third party utility lke Parted Magic instead.

Press [↓] until you get to Security Erase (HDD) Data.

Unfortunately the Lenovo Data Wipes requires one to setup a temporary Hard Drive Password.

Setting a Drive Password will lock the drive at the drive firmware level and there is some risk doing so. If you set a password and the password is forgotten you will never be able to use the drive again.

Press [↑] until you get to SM.2 Drive Password and press [↵].

You have the option to set a User only password or a User + Master Password.

The first is designed for a User Only in which case the user would have full admin access to perform a data wipe.

The latter is designed for a company with a large IT department. The IT department would have the Master password to unlock the device and to perform a data wipe.

Select [User] and press [↵].

Input a basic password in this case I will use the letter a:

Confirm the password:

Select [Continue]:

Press [F10] to save and Exit. Highlight [Yes] and press [↵]:

Your computer will restart:

You will be prompted for your password as your computer begins to reboot. If you have a master password set you can press [F1] to switch to the master user.

In this case, the user password a will be input.

As soon as the user password is input press [F1] to get to the UEFI BIOS Setup. You will be on the Main tab. Press [→] until you get to Security and press [↵]:

Press [↓] until you highlight (Hard) Disk Password and press [↵]:

Then press [↓] until you get to Security Erase (HDD) SSD Data and press [↵]:

Select Erase NVMe Slot 1 Data and press [↵]:

Highlight [Yes] at the confirmation dialog and press [↵]:

Input your User Password and press [↵].

If a user and a master password are set it may only ask for the master password, so you will need to know the master password.

The Secure Erase will be performed and the Drive password will be removed.

Select [Continue] and press [↵]:

It should then have an error stating no Operating System found, this is because your internal drives are blank:

Power down your Lenovo. Then begin the Windows Installation from the Bootable USB.

Surface Eraser Bootable USB

The Microsoft Surface seems to be behind Dell and Lenovo and uses a Bootable USB utility to initiate a Data Wipe Script opposed to being a feature incorporated within the Microsoft Surface UEFI BIOS Setup. It is a shame that Microsoft didn't instead incorporate this utility within an updated DiskPart.