How to Remove Bad Sector from Hard Disk Using CMD

Bad sectors on you hard disk prevent you from smoothly accessing your device and using the files. Luckily, you have the chance to repair bad sectors using CHKDSK command. If there is data loss on your disk after removing bad sectors from your hard disk using CMD, you can try EaseUS Data Recovery Wizard to recover your lost files.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.4

Table of Contents

Quick navigation on how to repair and remove bad sectors from hard disk:

Workable Solutions Step-by-step Troubleshooting
Procedure 1. Recover Data from Hard Disk Launch EaseUS Data Recovery Wizard, hover on where you want to perform data recovery, and then click "Scan". Select the files you want to recover. After choosing the data, click "Recover"...Full steps
Procedure 2. Repair Bad Sectors Using CMD Press the "Windows" key and type cmd. Right-click "Command Prompt" and choose "Run as administrator". In Command Prompt, enter the following command: chkdsk E: /f /r /x. If you don't want to perform the disk checking and repairing process in CMD...Full steps

All About Bad Sectors

A sector is a subdivision of a track (a circular path on the surface of a disk) on your hard disk that stores a fixed amount of data. A bad sector is a sector that appears to be defective and won't respond to read or write operations. There are two types of bad sectors:

Physical Bad Sector (Hard Bad Sectors)

As the name indicates, physical bad sectors are caused by physical damage on the hard disk. This type of bad sector cannot be repaired using CHKDSK or any other tools. If you want to continue using a hard disk with physical bad sectors, what you can do is to use some third-party tool to block these sectors on the hard disk and prevent the system and programs from visiting them.

Logical Bad Sector (Soft Bad Sectors)

Unlike physical bad sectors, logical bad sectors generally result from software errors like a sudden shutdown of your computer and virus attacks. In most cases, the operating system will mark a sector as bad when they try to read data from the sector and find the error-correcting code doesn't match the contents of it. Fortunately, logical bad sectors can be repaired using CHKDSK.

Recover Data from the Hard Disk First

Before introducing how to remove bad sectors using CMD, we strongly suggest you recover data on your disk to another safe place first. The command line used to solve this problem will erase all data on the hard disk, completely destroy the data directory structure, and even part of the file content. In this case, it is necessary to perform data recovery in advance, and the hard drive recovery software - EaseUS Data Recovery Wizard can help.

Download this tool from the button below and follow the guide steps to recover your data.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.4

Step 1. Select a location and start scanning

Launch EaseUS Data Recovery Wizard, hover on the partition/drive where the deleted files were stored. Click "Scan" to find lost files.

select a location where you deleted files

Step 2. Select the files you want to recover

When the scanning has finished, select the deleted files you want to recover. You can click on the filter to display only the file types you want. If you remember the file name, you can also search in the "Search files or folders" box, which is the fastest way to find the target file. 

Choose recoverable files

Step 3. Preview and recover deleted files

Preview the recoverable files. Then, select files you want to restore and click "Recover" to store the files at a new storage locations instead of the disk where the data was previously lost.

Recover deleted files

How to Repair Bad Sectors on Hard Disk Permanently Using CMD

After making sure your disk data is safe, now you can apply CMD to remove bad sectors. If there are logical bad sectors on your hard disk, you can repair them using the CHKDSK command. CHKDSK is a Windows built-in utility used to check the integrity of the disk and fix the logical errors found, including bad sectors. Being able to repair hard disk bad sectors, it is your first choice to repair a corrupted hard drive.

Running chkdsk can hopefully fix the hard disk issue, however, it can also result in total data loss. So, perform data recovery in advance, and then continue with the CMD method.

To permanently remove bad sector from hard disk using cmd:

Step 1. Press the "Windows" key and type cmd.

Step 2. Right-click "Command Prompt" and choose "Run as administrator".

Step 3. In Command Prompt, enter the following command: chkdsk E: /f /r /x

Notes: "E" is the drive letter of the disk you want to repair bad sectors from. The "/f" parameter tells CHKDSK to fix any errors it finds; "/r" tells it to locate the bad sectors on the drive and recover readable information; "/x" forces the drive to dismount before the process starts. 

If you don't want to perform the disk checking and repairing process in CMD, you can choose to use the disk check feature, which works the same as CHKDSK.

Step 1. Open "This PC", right-click the drive that has bad sectors, and choose "Properties".

Step 2. Go to the "Tools" tab.

Step 3. Click "Check" to check and repair the bad sectors on your hard disk.

Repair bad sectors by checking disk

Remove Bad Sector Using Automatic Command Line Tool

Download EaseUS CleanGenius and install it on your computer. Let's start checking and refixing file system error on your device now.

Step 1. Click "File Showing" to enter the next step.

click file showing

Step 2. Choose the target device and tick the box of "Check and fix file system error". Click "Execute" to start fixing the problematic device.

select device and check fix file system error

Step 3. When the fixing process completes, click "here" to open and use your device. 

After fixing file system error, click to open and use device

The Bottom Line

Bad sectors are sections of your computer's hard drive that have been damaged and have lost the ability to save and store your data. And any data stored in a bad sector is likely to be lost. If you cannot open your files or programs properly, it is most possible that the hard disk might have filled with bad sectors which make your data unreadable or corrupt. To make your hard disk usable, you should remove bad sectors from the hard disk using CHKDSK, which will repair the logical bad sectors and tell the system to jump over physical bad sectors.

Was This Page Helpful?

Updated by Cedric

Cedric Grantham is one of the senior editors of EaseUS who lives and works in Chengdu, China. He mainly writes articles about data recovery tutorials on PC and Mac and how-to tips for partition management. He always keeps an eye on new releases and likes various electronic products.

Read full bio

Written by Roxanne

Roxanne is one of the main contributors to EaseUS and has created multiple posts on digital devices like PCs, Mobile phones, tablets, Mac, etc. She loves to share ideas with people of the same interest.

Read full bio

Product Reviews

TrustScore 4.7 | 323 reviews
  • EaseUS Data Recovery Wizard is a powerful system recovery software, designed to enable you to recover files you’ve deleted accidentally, potentially lost to malware or an entire hard drive partition.

    Read More
  • EaseUS Data Recovery Wizard is the best we have seen. It's far from perfect, partly because today's advanced disk technology makes data-recovery more difficult than it was with the simpler technology of the past.

    Read More
  • EaseUS Data Recovery Wizard Pro has a reputation as one of the best data recovery software programs on the market. It comes with a selection of advanced features, including partition recovery, formatted drive restoration, and corrupted file repair.

    Read More