Fix “Drive Is in Use” Error in Windows 11

When formatting an internal or external drive in Windows 11, the process may fail with a message stating that the drive is currently in use by another program or process. This error typically occurs when an open file, background service, File Explorer window, or system process holds an active lock on the volume. This guide provides direct, step-by-step methods to identify the conflicting process, release the drive lock, and successfully format your storage device using built-in Windows 11 tools.

1. Close Open Applications and Windows Explorer

Background applications or active File Explorer windows often prevent Windows from locking the partition for formatting.

  1. Close any open files, media players, or software accessing files on the target drive.
  2. Close all File Explorer windows.
  3. Open Task Manager (Ctrl + Shift + Esc).
  4. Locate Windows Explorer in the Processes tab, right-click it, and select Restart.
  5. Attempt the format again.

2. Identify the Locking Process Using Resource Monitor

Resource Monitor allows you to pinpoint and terminate the exact process accessing your drive.

  1. Press Win + R, type resmon, and press Enter.
  2. Navigate to the CPU tab.
  3. Expand the Associated Handles section.
  4. In the Search Handles box, type the drive letter followed by a colon (for example, E:).
  5. Review the list of processes holding a handle on that drive.
  6. Right-click the offending process and select End Process.
  7. Try formatting the drive.

3. Force Format Using Diskpart

Diskpart runs with elevated administrative privileges and can force a dismount of the drive.

  1. Press Win + X and select Terminal (Admin) or Command Prompt (Admin).
  2. Type diskpart and press Enter.
  3. Type list volume and identify your drive number or letter.
  4. Type select volume X (replace X with your volume number or letter).
  5. Type format fs=ntfs quick (or fs=exfat / fs=fat32 depending on your needs) and press Enter.
  6. If prompted that the volume is in use, type Y to force a dismount.
  7. Type exit once the format reaches 100%.

4. Clean and Format with Disk Management

Disk Management offers a visual interface to delete existing volumes and re-create them cleanly.

  1. Right-click the Start button and select Disk Management.
  2. Locate the partition giving the error.
  3. Right-click the partition and choose Delete Volume (Note: This erases all data on the volume).
  4. Once the space is marked as Unallocated, right-click it and select New Simple Volume.
  5. Follow the on-screen wizard to assign a drive letter and format the drive.

5. Boot into Safe Mode to Format

If system services or antivirus programs persistently lock the drive, formatting in Safe Mode eliminates third-party conflicts.

  1. Open Settings (Win + I) and go to System > Recovery.
  2. Next to Advanced startup, click Restart now.
  3. After rebooting, navigate to Troubleshoot > Advanced options > Startup Settings > Restart.
  4. Press 4 or F4 to enable Safe Mode.
  5. Once logged in, open File Explorer or Disk Management and format the drive normally.
  6. Restart the computer to return to standard Windows 11 mode.