How to Delete an Undeletable, Locked or Busy File in Windows
Guide to deleting a file that Windows refuses to delete
How to Delete Undeletable, Locked, Busy or Currently In-Use Files in Windows
If you have been using Windows for some time, I'm sure you will have encountered the situation where you tried to delete a file, and received from Windows an error message telling you that the file is currently locked, busy, or currently used by another process (program that is currently running). Sometimes, these processes have really got no reason to continue holding that file open. The Windows Explorer is one of those guilty programs that hold a file open longer than it should, preventing you from deleting it. This tutorial outlines how you can go about deleting that file anyway, often without even rebooting the machine or doing something complicated.
Things to Watch Out For Before Starting
Before you wantonly delete files, you need to watch out for certain situations where you should NOT delete an undeletable file.
Sometimes, the file is really being used by another process. For example, some software running in the background (such as many antivirus software) often open and lock certain files while it is running. Forcibly deleting files that these programs need is a recipe for disaster. Make sure that the file is really not being used legitimately by some hidden program running in the background. Remember: there are a large number of processes and services running on your Windows system at any one time, even when you don't have any window open.
On occasion, the file is held open by a virus or some other malware running on your system. Although you can use the method prescribed here to delete the file, your efforts may be to no avail since such virus, spyware or malware often have sneaky methods to recreate the file everytime you reboot. If you think the file is a result of some malware, you should use an anti-malware program to clean your system instead. They tend to be more thorough in ferreting out all the instances of malware on your system than a cursory manual deletion of files. You can find many free antivirus software and free online virus scanners and cleaners and free malware cleaners, free spyware / trojan / hijackers detection and cleaning utilities around.
Software You Will Need
There are many ways and many free programs to delete a busy file. For the purpose of this tutorial, I will only select the use of one such program, called Unlocker. You can find it listed on thefreecountry.com's Free Utilities to Delete Currently Used, Locked, Undeletable, Busy Files page. There are other programs listed there as well. If you prefer to use another piece of software, go ahead and do so. For the sake of simplicity, I will only describe the use of Unlocker in this tutorial.
Steps to Removing a Locked or Undeletable File
Download and install Unlocker as mentioned above. Accept the defaults when installing.
Open up Windows Explorer and navigate to the file you wish deleted.
Right click on the file, and select "Unlocker". A window will appear giving you a list of processes (running programs) that are holding open the file. Scrutinize the list to make sure you really don't want these processes to continue to hold open the file. Remember, if you are currently editing a file in (say) a wordprocessor, that program will be legitimately locking the file. If you break the lock and delete the file, you may not only lose work, but you may also crash the wordprocessor.
If Unlocker cannot find any process locking the file, preventing it from being deleted, it will tell you that, and you can either delete it manually, or ask the program to delete it for you.
If you are satisfied that you still really want to remove the file, you have a few options. You can select "Delete" in the drop down box (it defaults to "No action") to let unlocker do it for you, or you can select "Unlock all" to cause Unlocker to force all the processes using the file to unlock it. In such a case, you will now be able to delete it manually using Windows Explorer (unless the process immediately reestablishes a lock before you can do anything). Alternatively, you can select the process locking the file in the dialog box window and click the "Kill Process" button. This will terminate the process that is currently holding the file open (that is, "kill" it). You can then manually delete the file from Windows Explorer.
If you have changed your mind, and have decided not to delete the file after all, simply hit the "Quit" button without doing anything (or hit the ESC key) and Unlocker will exit without harming your file.
Conclusion
This article provided you with one way to delete a file that is currently held open by a program/process running in Windows. However, remember, while you may be able to recover deleted files (undelete files you accidentally deleted) in some situations, it is difficult to undo the mistake of removing an important file. So delete that pesky "unremovable" file if you will, but do it with caution.
Copyright © 2007 by Christopher Heng. All rights reserved. Get more "How To" guides and tutorials from https://www.howtohaven.com/.
This article can be found at https://www.howtohaven.com/system/deleteundeletablefiles.shtml
howtohaven™ Site News Feed
Do you find this article useful? You can learn of new articles and scripts that are published on howtohaven.com by subscribing to the RSS newsfeed. Simply point your newsfeed reader or a browser that supports RSS feeds at https://www.howtohaven.com/howtohaven.xml.
Please Do Not Reprint This Article
This article is copyrighted. Please do not reproduce this article in whole or part, in any form, without obtaining my written permission.
Related Pages
- Free Hard Disk Backup and Restore, Hard Disk Image and Cloning Utilities
- Free Partitioning Software - Copy, Create, Move, Resize, Convert, Undelete Partitions
- How to Create a Bootable Windows XP Setup CD/DVD on a Preinstalled Windows System
- How to Record or Save Streaming Music or Audio
- How to Perform a Full Manual Defragmentation of Your Hard Disk Under Windows Vista
- Starting/Creating Your Own Website: The Beginner's A-Z Guide
- How to Register Your Own Domain Name
- Free DVD Authoring and Creation Software
Newest Pages
- Two Ways to View a Binary/Hexadecimal File on Windows Without Installing Anything
- How to Get the Hash (MD5, SHA1, SHA256, SHA512) of a File on Windows Without Installing Anything
- How to Solve the 0x80092004 Error When Installing a Windows 7 Security-Only/Monthly Update
- How to Create a Blog
- How to Record a Game Video
- How to Set Up a Standard User Account (or Limited Account) on Windows Vista and Windows 7 for Daily Use
- How to Securely Prepare Your Old Computer for Disposal
- How to Create / Start Your Own Website (Beginner's Guide)
How to Link to This Page
It will appear on your page as:
How to Delete Undeletable, Locked, Busy or Currently In-Use Files in Windows