How to Format a Disk Without an Operating System

To format a disk without booting an operating system from it, start the computer from a Windows installation USB made on another PC, open Command Prompt in Windows Recovery, and use DiskPart. This works even if the target disk contains the old operating system.

Warning: DiskPart’s clean removes all partitions and volumes from the selected disk. It is destructive and does not overwrite every sector. Back up first, then verify the disk model and capacity before running it.

What you need

  • A second working Windows PC with an internet connection to create the installer.
  • A blank USB flash drive with at least 8 GB of space. Creating the installer erases the USB drive.
  • The target disk installed in or connected to the computer you want to boot. Disconnect other storage drives if practical so they are easier to distinguish.
  • A backup of any files you need from the target disk.

1. Create a Windows installation USB

On the working PC, open Microsoft’s Windows 11 download page. Under Create Windows 11 Installation Media, select Download Now, run the Media Creation Tool, and follow its prompts to make a USB flash drive. Choose the USB carefully; the tool deletes its contents.

For Windows 10, Microsoft still provides its installation-media page, but support ended October 14, 2025. For ARM-based PCs, follow the manufacturer’s recovery-media guidance; Microsoft’s Windows 11 tool creates x64 media.

A laptop shows a Windows 11 installation media window with USB flash drive selected, and a USB drive sits beside it.
Create the installation USB on a separate working PC; the selected USB drive will be erased.

2. Boot the computer from the USB

Connect the installer to the target computer and power it on. Open the one-time boot menu; the key varies by manufacturer (often F2, F12, Delete, or Esc). Select the USB entry, preferably one labeled UEFI. This avoids changing the permanent boot order.

If the old OS starts, shut down fully and retry. If the USB is missing, check the computer maker’s boot-menu and Secure Boot instructions; settings vary by model.

A generic boot menu has UEFI: USB Flash Drive highlighted beneath Windows Boot Manager.
Choose the USB entry in the computer’s boot menu. Its wording varies by manufacturer.

3. Open Command Prompt in Windows Recovery

In Windows Setup, choose the language, time, and keyboard options, then select Next. On the next screen, choose Repair your computer.

A Windows Setup screen shows language, time, and keyboard selectors before the Next button.
Choose the setup language and keyboard layout, then continue to the recovery option.
A Windows Setup screen shows the Repair your computer link below the Install now button.
Select Repair your computer to open the recovery tools.

Choose Troubleshoot > Advanced options > Command Prompt. Labels can vary by version. If the menu is unavailable, press Shift+F10 from Windows installation media to open Command Prompt.

The Windows Recovery Choose an option screen has Troubleshoot highlighted.
Choose Troubleshoot to reach the advanced recovery tools.
The Windows Recovery Advanced options screen has Command Prompt selected.
Select Command Prompt to run DiskPart outside the installed operating system.

4. Identify the target disk in DiskPart

At the command prompt, start DiskPart and list the connected disks:

diskpart
list disk

Match the listed sizes to your target drive. Disk numbers can change, so do not assume it is Disk 0 or choose the largest disk automatically. Replace N with the target’s number:

select disk N
detail disk

Read the model and capacity in the details. If they do not match your target, stop and select the correct disk. If the target is missing from list disk, do not continue; check its cable or firmware detection, and consult the PC or storage-device maker for any required storage driver.

A DiskPart console lists two disk capacities, selects Disk 1, and displays its details for confirmation.
Match the disk number to the drive’s model and capacity before using any destructive command.

5. Format the disk or prepare it for Windows

To create a data volume

After confirming the selected disk, enter each line separately. This example creates one GPT partition, quick-formats it as NTFS, and assigns an available drive letter:

clean
convert gpt
create partition primary
format fs=ntfs quick label=DATA
assign
exit

Use NTFS for Windows. For a removable drive shared with macOS, use format fs=exfat quick label=DATA instead. GPT suits modern UEFI systems; for older BIOS compatibility, use convert mbr in place of convert gpt.

A DiskPart console displays clean, convert gpt, create partition primary, format fs=ntfs quick label=DATA, assign, and exit commands.
These commands create and quick-format one NTFS data volume on the selected disk.

To reinstall Windows on the cleared disk

Do not create a single data partition with the commands above. After confirming the correct disk, run clean, then convert gpt if you booted the installer in UEFI mode. Type exit to leave DiskPart and close Command Prompt. Return to Windows Setup, start the installation, and select the target disk’s unallocated space. Setup can create the system partitions it needs.

When DiskPart finishes a data volume, type exit again to close Command Prompt. The new volume will be available when Windows starts. For another operating system, stop after clean and use its installer or disk utility to create partitions and a file system.

Microsoft references

Leave a Comment

How to Play Minecraft Offline on Windows 10: Java and Bedrock

How to Play Minecraft Offline on Windows 10: Java and Bedrock

Prepare Java or Bedrock on Windows 10 for offline single-player, enable the right Xbox setting, and back up your local Minecraft worlds.

How to Change a File Type Icon in Windows 10

How to Change a File Type Icon in Windows 10

Change a file type icon in Windows 10 while keeping its current default app. Follow the FileTypesMan steps, handle icon picker issues, and restore the original setting.

How to Set PhysX Configuration in NVIDIA Control Panel on Windows 10

How to Set PhysX Configuration in NVIDIA Control Panel on Windows 10

Set PhysX in NVIDIA Control Panel on Windows 10, understand Auto-select vs. CPU or GPU, and learn when to use Windows Graphics settings instead.

Best Free Office Software: 6 Alternatives to Word, Excel, and PowerPoint

Best Free Office Software: 6 Alternatives to Word, Excel, and PowerPoint

Compare six free office suites for documents, spreadsheets, and presentations, including browser-based collaboration and offline desktop options.

How to Get Line Numbers in Notepad on Windows 10

How to Get Line Numbers in Notepad on Windows 10

Turn on Notepad’s Status Bar to see the current line and column in Windows 10, troubleshoot a disabled option, and learn when you need a line-number gutter.

How to Show a Message Box on Windows 10 (PowerShell and Batch)

How to Show a Message Box on Windows 10 (PowerShell and Batch)

Display a custom Windows dialog with a short PowerShell command, Command Prompt, or a reusable .bat or .ps1 file, including a title, icon, and buttons.

How to Fix Windows 10 Update Error 0x80071160

How to Fix Windows 10 Update Error 0x80071160

Fix Windows 10 update error 0x80071160 with Microsoft’s troubleshooter, a safe update-cache reset, DISM and SFC repairs, and a careful manual-install check.

How to Install Windows 10 From a UEFI Bootable USB

How to Install Windows 10 From a UEFI Bootable USB

Create a Windows 10 UEFI installer with Microsoft’s Media Creation Tool or Rufus, then boot and install safely without wiping the wrong drive.

How to Hide Microsoft Edge Tabs from Alt+Tab in Windows 10

How to Hide Microsoft Edge Tabs from Alt+Tab in Windows 10

Stop individual Edge tabs from crowding the Windows 10 Alt+Tab switcher. Change one Multitasking setting, limit recent tabs, and check why the option may be missing.

How to Fix PDF Thumbnails Not Showing in Windows 10

How to Fix PDF Thumbnails Not Showing in Windows 10

Enable Adobe’s PDF thumbnail handler, correct File Explorer’s icon settings, rebuild the thumbnail cache, and check OneDrive files that are not stored locally.