Microsoft Windows Error Code 0xC0000121: How to Fix It

Medium 20-30 minutes Medium Severity Verified June 2026
Error Code
0xC0000121
Brand
Microsoft Windows
Product Type
operating_system
Severity
Medium
DIY Difficulty
Medium
Estimated Fix Time
20-30 minutes
Error 0xC0000121 (STATUS_CANNOT_DELETE) occurs when Windows cannot delete a file because it is in use by another program or system process. This typically happens when you try to modify, move, or delete a file that is locked. The error is medium severity and can prevent updates or software installations. Follow the steps below to identify and release the file lock.
Ad

Tools You'll Need

How to Fix Error Code 0xC0000121

  1. Identify the Locked File

  2. Close Programs That May Be Using the File

    Be careful not to end critical system processes.
  3. Use Handle Tool to Find the Locking Process

  4. Close the Locking Process via Task Manager

    Ending a process may cause data loss in that program.
  5. Force Delete the File Using Command Prompt

    Back up the file first if important.
Ad

When to Call a Professional

If you cannot identify the locking process or the file is a critical system file, contact Microsoft Support. Also, if the error persists after multiple attempts, a system restore or clean Windows installation may be needed — at that point, consult a professional.

Frequently Asked Questions

What causes error 0xC0000121 in Windows?
This error occurs when Windows or an application tries to delete a file that is currently in use by another process. Common culprits include antivirus software, file explorer, or system services.
Can I fix error 0xC0000121 without using Command Prompt?
Yes, try restarting your computer in Safe Mode and then deleting the file. If that fails, use a third-party file unlocker tool like LockHunter.
Is error 0xC0000121 dangerous?
No, it is not dangerous. It simply means a file cannot be deleted because it is locked. However, if it affects important system updates, it may leave your system vulnerable.
How do I prevent this error in the future?
Make sure to close all programs before deleting files. Avoid deleting files while system scans are running. Keep your system updated.
Will this error affect my Windows updates?
Yes, if update files are locked, Windows updates may fail. Resolving the file lock should allow updates to proceed.