Have you ever tried to format or reinstall Windows but suddenly saw the error message "The drive where Windows is installed is locked"? This problem can be frustrating — a locked hard drive prevents you from deleting, formatting, or reinstalling the system. The issue can occur due to encryption, corrupted partitions, or restricted access permissions.
So, how to erase a locked hard drive safely and completely? Don't worry; this guide will show you two effective solutions, helping you completely erase the locked hard drive and restore the device to a usable state.

Locked hard drives can be erased, but the specific method depends on the type of lock. Below are the different types of locking situations and the corresponding erasure methods:
DiskPart is a built-in Windows command-line utility that allows you to manage disks and partitions. It can be used to erase a locked hard drive.
Follow the steps below to erase the locked drive using DiskPart CMD:
Step 1. Press "Windows + R" to open the "Run" box. Then, type and press "Ctrl + Shift + Enter" to launch Command Prompt as an administrator.cmd
Step 2. Type "diskpart" and press "Enter" to open the Diskpart utility. Next, type "list disk" and press "Enter". This will display a list of all installed and connected disks.
Step 3. Identify the locked hard drive by its size, then type "select disk X" (replace "X" with the number of the locked drive). If the disk is protected, run: "attributes disk clear readonly" first.

Step 4. Type "clean" and press "Enter". This will remove all partitions and data on the selected disk, effectively erasing it.
If you want to securely and thoroughly erase a locked hard drive in a Windows system, you can use a professional data erasure tool—Coolmuster Data Erasure. This software helps you completely wipe the hard drive data in just a few minutes, ensuring that all data is permanently deleted and cannot be recovered. However, if the drive is locked with BitLocker, you must first unlock it using BitLocker before using the software to erase the drive.
Main features of Coolmuster Data Erasure:
* Completely erase files from your Windows PC, ensuring they're permanently removed and unrecoverable.
* Securely erase data from USB drives, SD cards, hard drives, and other external storage devices.
* Choose from two erasure modes: Quick Erase for fast removal or Deep Erase for more thorough data destruction.
* Overwrite data multiple times to guarantee it can't be recovered.
* Erase all types of files, including photos, videos, audio, documents, emails, and more, from various storage devices.
* Three erasure options are available: File Shredder, Drive Wiper, and Free Space Wiper.
* A safe, read-only, and cost-effective solution for complete Windows data erasure, with no risk involved.
* Compatible with Windows 11/10/8/7.
Here is how to wipe a locked hard drive in Windows:
01Go to "This PC", right-click on the BitLocker-encrypted drive (it will likely have a padlock icon), and select "Unlock Drive". Enter your password in the dialog box and click "Unlock".
If you've forgotten your password but saved the 48-digit numerical recovery key generated when BitLocker was enabled, you can use the Microsoft account linked to BitLocker. The recovery key may be stored online.

02Download and install Coolmuster Data Erasure on your computer, open the program, and select "Drive Wiper". Then, choose the hard drive you want to erase.

03Choose the desired erasure level and click "Erase Now" > "OK" to begin erasing the drive. Once completed, your locked hard drive will be fully wiped.

Video Tutorial:
To reduce the likelihood of encountering locked hard drive issues in the future, consider these preventative steps:
A locked hard drive is not impossible to deal with. With the two methods mentioned above, you can easily erase it completely. If you're looking for a safer, risk-free, and more user-friendly solution, I highly recommend using Coolmuster Data Erasure. It not only securely wipes the hard drive but also protects your privacy, ensuring that your data cannot be recovered.
To prevent such incidents, please make sure to securely store your password after locking the hard drive, as not all locks can be easily unlocked.
Related Articles:
[Step-by-Step Guide] 5 Reliable Ways to Erase SSD Disk on Windows
Reset Toshiba External Hard Drive: Step-by-Step Guide for Beginners
[Solved] How to Erase SD Card on Windows/Mac/Android/Camera?
How to Delete All Data from HP Laptop? Solved in 3 Safe Ways