How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (2024)

This article explains the Microsoft Diskpart Erase utility. The command that erases the drive during this process is "Clean". In this article "Clean" and erase are used interchangeably. Cleaning or erasing a storage device removes all data and partitions from the drive.

Critical Instructions:

  • Disclaimer: Seagate Technology, LLC is not responsible for lost user data. Be sure to back up any important data on this drive before proceeding.
  • This article explains the Microsoft Diskpart Erase utility. The command that erases the drive during this process is "Clean". In this article "Clean" and erase are used interchangeably. Cleaning or erasing a storage device removes all data and partitions from the drive.
  • Please read all steps, instructions, and warnings before attempting the Diskpart Erase/Clean.
  • Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please make certain that you are erasing the correct disk.
  • Remove all additional drives from the computer excluding the drive you are booting from and the drive you want to Erase/Clean.

Items to note:

  • This article will walk through the steps of using the Microsoft Diskpart Erase utility to Clean the disk of a previous partition and format, including any data on the drive. This command takes only a few minutes to complete.
  • This article covers Diskpart Erasing a 3TB or larger drive that has a Master Boot Record (MBR) Partition table, which is thereby limiting its capacity to 2TB. However, this article also applies to any scenario where a Diskpart Erase of an entire disk is necessary.
  • For more information regarding drives over 2TB and GPT/MBR partition tables please see the following articles.
    • knowledge.seagate.com/articles/en_US/FAQ/218619en
    • http://www.seagate.com/support/downloads/beyond-2tb/
  1. To determine the disk number assigned to the 3TB+ MBR partitioned drive follow the steps below.
    1. From the Start menu right click on Computer which will provide a drop down menu. (If you are on Windows 8 or 8.1 move your mouse to the bottom left hand corner of the desktop screen and right click. Then select Disk Management).
    2. Choose Manage.
    3. Select Disk Management (listed under Storage).
    4. Look for the drive that is identified as the 3TB drive (2794GB). The properties window shows that the partition table on the drive is MBR . Important: note the Disk number (such as Disk 1).
      How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (1)
  2. Open a Command Prompt window. To open the Command Prompt on a Windows Vista or Windows 7 machine click on Start and type cmd in the search bar. Then right click on cmd.exe and run as administrator. It will prompt you with the message, "Do you want to allow the following program to make changes to this computer," click yes. A black Command Prompt window will open.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (2)

    On Windows 8 move your mouse to the bottom left hand corner of the desktop screen and right click. Select Command Prompt (Admin) from the pop-up menu.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (3)

    This is the Command Prompt window.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (4)

  3. From the command prompt, type diskpart and press Enter.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (5)

    The diskpart prompt will open.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (6)

  4. From the diskpart prompt, type list disk and press Enter.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (7)

    A list of disks will appear in a text format. You will return to the diskpart prompt. Step one verified that Disk 1 is the 3TB drive. Warning: Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please be certain that you are erasing the correct disk.

    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (8)

  5. From the diskpart prompt you will need to select a disk disk number (for instance, if the 3TB+ drive is Disk 1, you would type select disk 1) and press Enter. Warning: Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please be certain that you are erasing the correct disk.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (9)

    A message appears saying that the disk is selected. You will return to the diskpart prompt. Warning: Diskpart Erase/Clean will permanently erase/destroy all data on the selected drive. Please be certain that you are erasing the correct disk.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (10)

  6. From the diskpart prompt, type clean and press Enter. The drive's partition, data, and signature is now removed. You will return to the diskpart prompt. Warning: Once you type clean and hit enter the drive will be erased. No warning will be provided.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (11)
  7. The Command Prompt window will display the message "DiskPart succeeded in cleaning the disk". Close out of the Command Prompt window by clicking the red X in the upper right hand corner.
    How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (12)

    Now the 3TB+ drive can be re-initialized, partitioned, and formatted.

How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US (2024)

FAQs

How to Diskpart Erase/Clean a Drive Through the Command Prompt | Support Seagate US? ›

From the diskpart prompt, type clean and press Enter. The drive's partition, data, and signature is now removed. You will return to the diskpart prompt. Warning: Once you type clean and hit enter the drive will be erased.

How do I completely wipe my hard drive from command prompt? ›

To clean a disk:
  1. At a command prompt, type diskpart.
  2. At the DISKPART prompt, type select disk 0.
  3. At the DISKPART prompt, type clean all.
  4. At the DISKPART prompt, type exit.
Jul 20, 2021

How to use diskpart to clean a drive? ›

Replies (11) 
  1. During the Windows 10 setup, press Shift + F10 keyboard shortcut to open Command Prompt.
  2. When Command Prompt opens, enter diskpart and press Enter.
  3. Now enter list disk and press Enter. ...
  4. Enter select disk <disk number> and press Enter. ...
  5. Enter clean and press Enter.
  6. Enter exit and press Enter.
Jan 30, 2023

How to delete a hard drive using diskpart? ›

Steps to Erase and Clean a Drive Using Disk Part Command on Windows
  1. Press the Windows Key + X. Click Disk Management.
  2. Locate the Disk # for the drive.
  3. Press the Windows Key. Type cmd. ...
  4. Type diskpart. Press Enter.
  5. Type list disk. Press Enter.
  6. Locate the Disk #.
  7. Type Select Disk #. Press Enter. ...
  8. Type clean. Press Enter.
Dec 21, 2018

How to remove hard drive from command prompt? ›

Safely Remove or Eject a Disk Using the Command Line
  1. Use the diskpart utility to safely remove a disk drive. ...
  2. On command prompt, type "diskpart" and wait for the new prompt, then type "list volume". ...
  3. Type "select volume <number>", where <number> is the number of your USB storage.
  4. Then, type "remove all dismount".

How do I completely wipe a corrupted hard drive? ›

Use Disk Management to wipe a hard drive
  1. Connect your external drive to your PC via a USB port. Then, press the Windows key + X and select Disk Management.
  2. Right-click the drive you'd like to wipe and select Format. Choose a new file system.
Jan 27, 2022

How do I force wipe my hard drive? ›

To wipe your drive in Windows 10, go to Settings > Update & security > Recovery, and then click the Get Started button. When prompted, choose the option for Remove everything. You should then choose the Local reinstall option to reinstall Windows from your computer.

How to use diskpart to repair hard disk? ›

Let's use the diskpart command to make the drive available for scanning.
  1. Open Command Prompt. Type diskpart and press enter. ...
  2. In the new window, type list volume and hit enter.
  3. Select your main drive. ...
  4. Now type attributes disk clear readonly and hit Enter.
Sep 22, 2023

What is the command for Disk Cleanup? ›

On your keyboard, press the Windows and R keys at the same time to open the Run window. Type cleanmgr, then press ENTER. The Disk Cleanup window should appear. Select the drive you want to clean, then click OK.

How to repair hard drive using cmd? ›

Run CHKDSK from the command prompt
  1. Click on “Start” > type “cmd” > “Run as administrator”.
  2. Type a CHKDSK command in the command prompt and press “Enter”. Include parameters like “/f”, “/r”, and “/x” to scan and repair any errors. Note: If you opt to only scan your PC for drive errors, type “chkdsk” and press “Enter”.
Mar 29, 2023

What are the commands for diskpart? ›

Here are some of the top commands you can use with Windows' DiskPart utility:
  • List disk. ...
  • Select disk [number] ...
  • Clean. ...
  • Create partition primary [size=xxx] ...
  • Delete partition [override] ...
  • Format fs=ntfs quick. ...
  • Assign letter=[letter] ...
  • Extend [size=xxx]
Apr 12, 2024

How do I clear the Command Prompt? ›

Type “cmd” and press Enter to open the Command Prompt. Type “cls” and press Enter. This command will instantly clear the screen, giving you a clear workspace. It's a quick and effective method.

How to reset PC using diskpart? ›

Run DiskPart
  1. Type diskpart into the command prompt and press Enter.
  2. Type list disk and press Enter to see all the attached disks.
  3. Make sure you know which disk you want to reset before continuing! ...
  4. Type select disk # and press Enter (where # is the disk number you want to reset)

How to wipe hard drive from Command Prompt? ›

From the diskpart prompt, type clean and press Enter. The drive's partition, data, and signature is now removed. You will return to the diskpart prompt. Warning: Once you type clean and hit enter the drive will be erased.

How do I use diskpart to clean and format a drive? ›

Follow the steps below to format a drive:
  1. STEP 1: Open Command Prompt As Administrator. Opening the command prompt. ...
  2. STEP 2: Use Diskpart. Using diskpart. ...
  3. STEP 3: Type List Disk. ...
  4. STEP 4: Select the Drive to Format. ...
  5. STEP 5: Clean the Disk. ...
  6. STEP 6: Create Partition Primary. ...
  7. STEP 7: Format the Drive. ...
  8. STEP 8: Assign a Drive Letter.
Jul 12, 2023

What is the command to clear the hard disk? ›

Click Start, and then click Run. In the Open box, type the following command, and then press Enter: c:\windows\SYSTEM32\cleanmgr.exe /dDrive Note In this command, the placeholder Drive represents the drive letter of the hard disk to be cleaned.

How do I completely wipe my computer and all drives? ›

How to wipe your computer hard drive
  1. Go to “Settings.”
  2. Choose “System” on the left side menu.
  3. Click “Recovery.”
  4. Click “Reset PC.”
  5. Choose “Keep my files” (removes apps and settings but keeps your personal files) or “Remove everything” (removes apps, settings, and your personal files).
Sep 4, 2023

How to hard reset a PC using Command Prompt? ›

You can also type systemreset –factoryreset in the Command Prompt window and press the Enter. Then you can make a choice of how to do factory reset. Note: If Windows 10 cannot load normally, then you need to boot into WinRE and choose Command Prompt to continue.

How do I wipe a dead computer hard drive? ›

If your laptop is dead and will not turn on, you will need to remove the hard drive and reinstall it into either another PC or a hard disk eraser; a desk tower would also work. If you have another computer, you can place the hard drive in an external hard drive enclosure, then connect it to another PC using a USB.

Top Articles
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 5758

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.