AVG Signal Blog Performance Hardware How to Use CHKDSK Commands to Scan and Repair Hard Drives in Windows

Written by Anthony Freda
Published on May 22, 2023
Reviewed by Sandro Villinger

What is CHKDSK?

CHKDSK (check disk) is a Windows utility designed to scan for and repair system errors. It checks whether a file’s size, location, and other system information matches the data that's actually on the disk. CHKDSK also looks for parts of the hard drive that may corrupt your data.

This article contains :

    CHKDSK lets you check a hard drive for errors in Windows 10 or 11, specifically the kind of errors that arise when files aren't where they're supposed to be. Hard drive problems are one reason why PCs get slower over time.

    If you think your computer’s performance is lagging, test your PC’s battery life. And get rid of unnecessary apps on your PC to help it run faster, smoother, and longer.

    How long does CHKDSK take?

    CHKDSK can take between 20 minutes and several hours to complete, depending on the age and capacity of your hardware. Bear in mind that your computer will run slowly while CHKDSK is working. If possible, let the CHKDSK scan finish before resuming other processes.

    If it fails to complete, try canceling the scan and running CHKDSK again. But repeated failure to complete is a sign that something may be seriously wrong. If so, you’ll likely need to work through the steps for repairing a drive in Windows 10 or troubleshooting CHKDSK.

    CHKDSK commands

    You can choose different CHKDSK parameters to pinpoint specific problems. The chkdsk command will search the disk drive for issues, but it won't fix any of them. If your results tell you that “No further action is required,” you won’t need to use any other commands this time.

    Here’s an overview of the CHKDSK commands:

    • chkdsk cross-references the directory of files with the file system to verify that they match. It’s just a diagnostic and doesn’t try to fix anything.

    • chkdsk /f fixes any structural issues with the file system and directory, correcting inconsistencies between the two.

    • chkdsk /r searches for corrupted parts of the physical hard drive (while also running chkdsk /f) and tries to recover the data there to put it in a part of the drive that isn’t damaged.

    • chkdsk /x dismounts a drive so that it can be checked and fixed. Running this command also runs /f.

    • chkdsk /v shows the path and name of all files while running a check.

    These commands will automatically run on the active drive shown next to your cursor. To run CHKDSK on a different drive, type chkdsk [drive letter]: /f, replacing [drive letter] with the letter of the drive you want to scan. For example, to repair the D drive, enter chkdsk D: /f.

    The drive with Windows on it (usually C) will ask you to restart before CHKDSK can run. Choose Y to continue. Windows will run CHKDSK right after it’s restarted.

    Image of command prompt with the appropriate command for running CHKDSK on the D drive. "chkdsk D: /f"

    What does chkdsk /r do?

    Chkdsk /r finds and attempts to repair corrupted portions of your hard drive. It automatically runs chkdsk /f as part of this process to correct errors on your disk as well. This means that you don’t have to run the command chkdsk /f /r.

    Chkdsk /r is one of the most valuable check disk commands, because it can alert you to parts of your hard drive that are starting to malfunction. This can serve as a reminder to back up important files so you don’t lose them to hard drive failure.

    Before running chkdsk /r, you should backup any valuable files to another storage drive, as they may get deleted after the process completes. There’s a small chance that if these files are located near a bad sector, chkdsk /r will identify them as corrupted and get rid of them.

    Chkdsk /r is not meant to be a data recovery utility, and it sometimes doesn't recover corrupted files properly. The safest method for data recovery is to use a previously created backup, or to ask an expert before executing chkdsk /r.

    If you’re wondering whether to do chkdsk /f or /r, you find out much more information doing /r.

    If you're having trouble getting the scan to work, opening the command prompt as an administrator and running chkdsk /f /r /x should do the trick.

    What does chkdsk /f do?

    Chkdsk /f performs a whole disk check and rewrites the directory of folders to match what’s actually on the drive. This is important because if Windows tries to access an important system file and it isn’t there, it can lead to a blue or black screen of death or cause other glitches and crashes.

    A computer hard drive can be thought of a bit like a book, except the information stored within it is constantly being added, updated, moved, and deleted. So the chkdsk /f function ensures that your disk’s “table of contents” lists all the right “chapters,” that every “chapter” has an entry, and that all entries point to the correct “page numbers.”

    CHKDSK commands glossary

    Want to know how to run check disk in even more ways? Here are some other commands you can use when performing a disk check in Command Prompt:

    • chkdsk - Checks for issues on the default drive and file system without fixing or repairing.

    • chkdsk [drive letter]: - Does the same, but for the specified drive.

    • /f - The “f” stands for “fix,” and here it means fixing the file system information so that it directs you to the right files.

    • /r - The “r” stands for “repair.” /r finds corrupted parts of the hard drive and attempts to recover the files that were stored there.

    • /x - Dismounts the drive before running CHKDSK, which may be necessary to get it to run.

    • /f /r /x - Runs the /f and /r commands on a dismounted drive.

    • /scan - Scans the disk without dismounting it (only possible with NTFS).

    • /b - Resets the list of bad clusters (damaged parts of the disk) and re-scans for the same.

    • /v - Checks the disk, but displays the names of the files as it’s doing so.

    • /i - A quicker and less thorough scan, where index entries are skimmed rather than checked deeply.

    • /c - Another type of superficial scan, which doesn’t check cycles in folders.

    How to run CHKDSK in Windows 10

    There are multiple ways to run CHKDSK in Windows 10, even when your PC doesn't seem to be working. If you have to repair your Windows 10 hard drive in an emergency, CHKDSK might be the answer.

    There are several ways to check your hard drive for errors in Windows 10. Here are three Windows 10 CHKDSK options you can try:

    Run CHKDSK from your computer

    You can use the check disk utility from within Windows, and it'll scan your drive for errors. Here’s how to run CHKDSK in Windows 10:

    1. Type chkdsk in the search box in your taskbar.

      A picture of a taskbar with "check disk" typed in, and the user has right clicked the check disk application and is highlighting the option "Run as administrator."
    2. Right-click chkdsk and choose Run as Administrator.

    This method may cause CHKDSK to run without showing you the results. For more detailed and customized results, try running CHKDSK from the Command Prompt. The CHKDSK commands in Windows 10 are the same as in all other versions of Windows.

    Run CHKDSK from Command Prompt

    Command Prompt is a useful tool that lets you execute commands in Windows and directly tell Windows what to do. If you’re not careful, this can result in additional complications, so make sure to follow these steps closely.

    Here’s how to use Command Prompt to check your disk:

    1. Type cmd (or command prompt) in the search box in your taskbar.

      A picture of a taskbar with "command prompt" typed in, and the user has right clicked the command prompt application and is highlighting the option "Run as administrator."
    2. Right-click Command Prompt and select Run as Administrator.

      A picture of the command prompt, with "chkdsk" typed into the input.
    3. Type chkdsk and hit Enter. This command will make the CHKDSK utility scan for problems without making changes.

      Type chkdsk and hit Enter to make the CHKDSK utility scan for problems without making changes.
    4. To run CHKDSK on a drive other than your C drive, specify the volume right after chkdsk. For example, check your D drive by typing chkdsk D: /f.

      Type chkdsk /r to make CHKDSK repair corrupted files – but only if a problem was found. If there are no problems at this stage, you don’t need to do anything further.

      An example of results from running chkdsk. The results say that no problems were found.

    The best part about Command Prompt is that it’s been consistently used across all Windows operating systems. Whether your computer is brand-new or 20 years old, you can use the same commands, which is helpful when learning how to run chkdsk in Windows 10 or Windows 11.

    Run CHKDSK from the Windows 10 installation disk

    Your Windows 10 installation disk is a partition of your hard drive isolated from the rest of your data. If you can't access your main hard drive, the installation disk will let you install a fresh version of Windows. It should be accessible as long as you can turn your computer on.

    If you can't access your main drive, running CHKDSK from here might do the trick. Here's how to run CHKDSK from your Windows 10 installation disk before boot:

    1. Turn on your computer and repeatedly tap F8 before the Windows logo shows up.

    2. When prompted, click Repair Your Computer.

    3. Click Troubleshoot and select Advanced Options.

    4. Click Command Prompt. You can use this command prompt just the same as any other, and you can run CHKDSK on your Windows drive before it boots.

      A screenshot of the advanced options you can access when you boot from Windows 10 Installation disk.

    CHKDSK should identify and remove bad sectors or corrupted data so that your computer will work normally again.

    Now that you know how to run CHKDSK, you have a new tool to keep your computer and hard drive in tip-top shape. But what about other types of necessary maintenance?

    AVG TuneUp is a specialized maintenance and optimization tool that helps ensure your PC runs smoothly. No task is left behind, whether it's clearing the cookies and cache from your browser or finding and rooting out corrupted data. Don’t bother poking around in Command Prompt — use an app to do it automatically.

    How to run CHKDSK on Windows 11

    If you’ve made the switch to Windows 11, one thing that hasn’t changed is how to do CHKDSK. Just as in previous versions of Windows, you can still use Command Prompt to run the scan, as well as the exact same parameters listed above.

    Here’s how to run CHKDSK in Windows 11:

    1. Type cmd in the taskbar and click Command Prompt.

    2. Type the CHKDSK command of your choosing, for example, chkdsk /f, and then hit Enter.

    To help keep things running smoothly, Windows 11 runs CHKDSK every so often automatically, but it may improve Windows 11 performance if you change the schedule.

    If you’re thinking of upgrading to Windows 11 or to a new PC, be sure to check your computer specs carefully. When determining how powerful a computer you need, the answer usually depends on how you intend to use it.

    Older Windows versions

    Every outdated version of Windows can still run CHKDSK — even Windows XP. The blue screen of death has been with Windows since time immemorial, but so have disk scans and methods for fixing the blue screen of death. The CHKDSK parameters will work the same on all versions.

    Scanning and fixing hard drive issues with CHKDSK can help you avoid the blue screen of death.The dreaded blue screen of death.

    In any version of Windows, the Command Prompt and the commands to use are the same, whether you’re trying CHKDSK on Windows 7 or XP. Use chkdsk /f for reviewing and fixing structural integrity, and chkdsk /r for finding and fixing bad sectors.

    • In Windows XP, you can access Command Prompt by clicking Start, then Run, and typing cmd.

    • In Windows Vista and Windows 7, type cmd in the Start menu search bar. You can run CHKDSK in Windows 7 or Vista just as you would in Windows 10.

    • In Windows 8, you may need to press the Windows key + C to open the Charms bar, and then Search. Type cmd there.

    Once you're in, refer to the earlier instructions for running CHKDSK from the Command Prompt. You don’t need to wonder how to check your disk, because it’s the same in any command prompt. Windows 7 check disk will look and work the same as it does on Windows 10.

    If you've started up an old computer and see a black screen, don't worry. You may be able to fix a black screen on Windows startup and make your computer usable again. Look up other ways to revive an old PC, too.

    Older computers can be riddled with issues like junk files or broken shortcuts — you can use a dedicated PC cleaner tool to help you tidy up your machine. Or, you might also want to physically clean your PC — just don’t do both at the same time.

    You may be wondering if you can use Scan Disk in Windows 10. The ScanDisk command isn’t in use anymore, and it’s been replaced by CHKDSK.

    Why do I need to use CHKDSK?

    You need to use CHKDSK when a boot error occurs. Corrupted data can break Windows, and CHKDSK can find those bad files and let Windows install a fresh copy in a new location. You can also use CHKDSK to prevent data loss.

    What does CHKDSK do? It monitors the long-term health of your data storage device. Disk repair in Windows 10 is essential to keep your computer working smoothly for many years.

    How does data go missing or get corrupted in Windows?

    Ruined parts of a hard drive are called bad sectors, and CHKDSK can detect them with a disk scan. CHKDSK will then attempt to fix the bad sectors so they’re usable again, potentially recovering the data in the process.

    A mockup of a hard drive, showing scattered red segments representing bad sectors and the order that results after running a CHKDSK scan in Windows.A disk with red segments representing bad sectors (above) and an organized disk (below).

    Here are the ways data can get corrupted:

    • Hard bad sectors occur when the media is physically damaged, like when a speck of dust lands on the disk or the read/write head makes contact and ruins the surface.

    • Soft bad sectors are when malware or an improper shutdown confuses the disk drive. From that point on, the computer remembers that this data wasn't verifiable and marks it as a bad sector. You lose disk space and possibly even the file that didn't get written correctly.

    How to prevent corrupted data

    An increasing number of bad sectors means your hard drive is about to fail. Back up your data immediately to avoid losing it, and get a new hard drive. In the meantime, run CHKDSK regularly to keep your PC running as fast and smoothly as possible, and tune up Windows 10 when you can.

    A large number of bad sectors can also indicate malware, which must be taken care of immediately if you don't want to lose any more data. Malware can cause your computer’s performance to suffer, with 100% disk usage at all times (something that should be addressed immediately).

    When your hard drive is healthy, your PC boots up quickly and functions properly. Keep yours in top shape by running the defragger or letting your chosen malware and virus removal tool do a sweep to make sure there’s nothing hindering your computer’s performance.

    Don’t have time to mess with multiple apps to keep your computer in good shape? Want to use a tool that you can set and forget? AVG TuneUp automatically clears out all the stuff that builds up behind the scenes like traces from your browsing history, old downloaded files, and more. Give AVG a spin today.

    CHKDSK Troubleshooting

    Here are some common issues that people struggle with before CHKDSK can run a disk scan.

    Volume is in use or read-only

    CHKDSK can’t run on any drives currently being used by Windows. Your drive needs to be inactive before CHKDSK can make any changes. Windows runs all sorts of services, including Service Host Superfetch, that keep a hard drive occupied.

    The following error messages indicate the drive is active and cannot be checked:

    • Cannot continue in read-only mode.

    • Volume is in use by another process.

    • Cannot lock current drive.

    All these errors mean that the drive is currently busy. You might have a photo open, for example, and you simply need to close the program so the volume is no longer in use.

    Check if you have a file open

    Use your Task Manager to see if there’s anything you can close. Maybe then you can run the Windows disk check.

    A screenshot of task manager, where there might be a program using a file on the external harddrive.

    Use Safe Mode

    Another possibility is that Windows is using your drive. You can get around this by agreeing to schedule CHKDSK so it runs on the next startup. If you see this prompt and want to check your disk the next time you start up, type Y here:
    Command prompt showing the error message that the volume is in use by another process, and asking the user is they'd like to schedule this volume to be checked the next time the system restarts.If you’ve restarted but still can’t run CHKDSK, go to Advanced Options in Safe Mode. Repeatedly tap F8 at Startup to access these options.

    You can also get to the advanced options from your desktop by following these steps:

    1. Go to Settings and select Update & Security Options.

      A screenshot of Windows 10's settings window. Update & Security is circled.
    2. Click Recovery.

      The menu for Update & Security in Windows Settings. "Recovery" is circled.
    3. Click Restart now under Advanced Startup.

      The "Recovery" options in Windows 10 settings. Under Advanced Startup, the "Restart now" button is circled.

    You will now go straight to the Advanced Startup options, where you can run the Command Prompt and execute CHKDSK in cmd on the Windows drive without issue.

    One way to avoid these obstacles is to use an all-in-one maintenance program. AVG TuneUp knows the right time to scan your hard drive with CHKDSK, so you don’t have to bother with advanced settings. It also covers everything from clearing the browser cache to deleting junk files.

    Enjoy a continually optimized PC without spending any time on it yourself. Try AVG TuneUp today.

    What to do when CHKDSK is frozen

    If CHKDSK freezes, you can safely cancel the process ― but you need to find out what made it freeze and run another scan as soon as possible. Just like an extremely loud fan, this could be a sign of poor hard drive health, so you should try to fix the problem immediately by following these steps:

    1. Backup all or your most important data to an external drive, because this can be a clear sign that your hard drive is failing.

    2. Defrag your hard drive by typing “defrag” into the taskbar and running Defragment and Optimize Drives.

    3. Try running Disk Cleanup. Type “disk cleanup” in the taskbar and run Disk Cleanup.

    4. Open Command Prompt as admin and type sfc /scannow and reboot your computer once it’s done. This replaces essential system files which have been corrupted.

    5. Open Command Prompt as admin again and type dism.exe /online /cleanup-image /restorehealth. This restores parts of your Windows installation that have been damaged or corrupted.

    If these steps don’t work, try repairing Windows with another Windows installation media.

    If you’ve tried everything else and still didn’t manage to run a successful scan, you could try formatting the hard drive. To avoid complete disk failure and data loss, we highly recommend that you upgrade to a new HDD or SSD and back up any important data.

    “Windows found errors on this drive that need to be repaired”

    This error message means that CHKDSK has found something that needs fixing. First, make sure you understand what chkdsk /r does, and bear in mind that there is some risk of losing important files when running a repair scan. Then, run chkdsk /r using Command Prompt.

    If you still get the same message, try following the steps for what to do when CHKDSK is frozen. You may also get a message saying there isn’t enough space to restore corrupted files. In this case, you may be able to fix the problem temporarily by deleting files and removing bloatware.

    How to change a scheduled disk check

    CHKDSK runs automatically on some versions of Windows, which can be an inconvenience ― especially if you’re already struggling with a slow computer. And the process only gets longer and slower as hardware ages. Here’s how to change a scheduled disk check:

    1. Type cmd in the taskbar and click Run as administrator under Command Prompt.

       "cmd" has been typed into the taskbar, and Command Prompt is shown, with Run as administrator circled.
    2. Type chkntfs /t:[000], with [000] being the number of seconds (up to 259,200 seconds or 72 hours) to delay CHKDSK. For example, if you type chkntfs /t:60, the CHKDSK hard disk scan will be postponed by one minute.

      Command Prompt is shown, and "chkntfs /t:000" is typed in.

    Keep your PC performing its best with AVG TuneUp

    You can ensure that your current computer functions properly for years with proper PC maintenance. Even better, you don't have to do anything different — you just have to download one program that does it all for you.

    AVG TuneUp schedules regular maintenance to clear out the stuff that commonly bogs down your PC. It uninstalls what you don't need, cleans up the files that aren't being used anymore, and automatically updates your programs. The result is a computer that runs faster than ever. Try AVG TuneUp for free right now.

    Optimize your Android with AVG Cleaner

    Free install

    Protect your iPhone against threats with AVG Mobile Security

    Free install
    Anthony Freda