Useful Tips

How to delete a file that is not deleted

Pin
Send
Share
Send
Send


Probably, each time and again faced with a situation where any file is not deleted. There can be many reasons for this. The most common one, in my opinion, is when a file is busy with a process. That is, a process is running on the computer that uses the file that needs to be deleted. You can download a program that will do all the work for you and help you delete the file, but it’s much more interesting to understand the nature of the problem and solve it with the built-in tools, that is, delete the undeleted file manually.

Next, I will describe how to delete an undeletable dll or exe file manually. Such a task very often arises in the process of combating viruses. If it is impossible to delete a file other than dll and exe occupied by the program, then you just need to remember which program you could open this file or where it can be used to close this program.

I’ll warn you that if the file is not deleted due to the fact that it is used by the program, then it may be necessary for it to work, so think about whether to delete it.

In any version of Windows of the NT family there is a tasklist command-line program that allows you to display a list of processes performed by the operating system. To use it to delete undeletable files, follow the instructions:

  1. Start -> Run (Win + R).
  2. In the window that appears, type cmd, press Enter.
  3. In the black window that appears, type tasklist / m> c: tasklist.txt. This command displays a list of all processes with the modules involved (dll and exe files) and saves this list to c: tasklist.txt, instead to display on the screen.
  4. Open the file c: tasklist.txt and find the dll or exe file that cannot be deleted.
  5. If the file name is in the list, then end the process (via the task manager or taskkill command) that uses this file. The names of the processes are recorded in a text file on the left, the names of the involved dll and exe on the right. Often the undeletable file is used by the explorer.exe process, which displays windows with folders, icons on the desktop. It, like any other process, can be completed, while, of course, all the windows that explorer.exe and the start menu panel should display will also close. In this case, do not close the black window. After the explorer.exe process is complete, it will not be closed and you can type a command in it to delete the file del path_to_file.

I will add that there are processes whose completion can lead to a reboot of the computer, usually these are some of svchost.exe, so do not be alarmed if Windows suddenly decides to restart the computer. After the reboot, everything will be as before. In this case, deleting an undeletable file is much more difficult, you must either use safe mode, or ERD, or another operating system.

  • Finally delete the file. And you can start the previously completed process back.
  • All these manipulations can also be carried out with a remote computer, provided that it has administrator rights.

    I also want to note that there are cases when, when deleting a file, it seems to be deleted without unnecessary error messages, however, after updating the contents of the folder, the file appears again. In this case, it is necessary to check the file system for errors. To do this, run the command at a command prompt

    Delete a file without additional programs

    The file is already in use. Close the file and try again.

    As a rule, if the file is not deleted, then in the message you see which process it is busy with - it could be explorer.exe or some other problem. It is logical to assume that to delete it, you need to make the file “not busy”.

    This is easy to do - run the task manager:

    • In Windows 7 and XP, you can get to it by Ctrl + Alt + Del.
    • In Windows 8 and Windows 10, you can press the Windows + X keys and select the task manager.

    Find the process using the file you want to delete and uncheck the task. Delete the file. If the file is busy with the process explorer.exe, then before removing the task in the task manager, run the command line as administrator and, after removing the task, use the command on the command line del full_path_to_fileto remove it.

    To return to the standard desktop view after that, you need to run explorer.exe again, for this in the task manager, select “File” - “New Task” - “explorer.exe”.

    Delete a locked file using a bootable USB flash drive or disk

    Another way to delete such a file is to boot from any LiveCD drive, from the resuscitation disk of a system, or from a bootable Windows flash drive. When using LiveCD in any of its variants, you can use either the standard graphical interface of Windows (for example, in BartPE) and Linux (Ubuntu), or by means of the command line. Please note that when booting from a similar drive, your computer’s hard drives may appear under different letters. To make sure that you delete the file from the desired drive, you can use the command dirc: (this example displays a list of folders on drive C).

    If you are using a bootable USB flash drive or installation disk for Windows 7 and Windows 8, at any time during installation (after the language selection window has loaded and in the next steps), press Shift + F10 to enter the command line. You can also select "System Restore", a link to which is also present in the installer. Also, as in the previous case, pay attention to the possible change of drive letters.

    Windows 10 file deletion not correct

    1. Trying to delete files that are used in the processes of the Windows 10 operating system. It is quite logical that access to such files is strictly monitored by the kernel of the system and deleting such files is IMPOSSIBLE!
    2. Try to delete files that are used in running programs and applications. Deleting such files is also prohibited by the system! (“Forcibly” deleting the file will be followed by a chain upon completion of work, of all applications where this file was used.)

    Using DeadLock to unlock and delete files

    Using the program is very simple - after installation, just right-click on a file that is not deleted and select "Unlocker" in the context menu. If you use the portable version of the program, which is also available for download, run the program, a window will open to select the file or folder that you want to delete.

    The essence of the program is the same as in the first described method - unloading from memory the processes that the file is occupied. The main advantages over the first method - using the Unlocker program, it is easier to delete a file and, moreover, it can find and complete a process that is hidden from the eyes of users, that is, is inaccessible for viewing through the task manager.

    Update 2017: Another way, judging by the reviews, which worked successfully, was suggested in the comments by the author Toha Aytishnik: install and open the 7-Zip archiver (free, it works like a file manager) and rename the file in it, which is not deleted. After that, the removal is successful.

    How to delete Windows 10 files that are not deleted

    Before deleting system files, you need to make sure in safety delete such files. Deleting files necessary for Windows to work will lead to a complete system crash. We recommend that you backup Windows 10.

    To delete system filesmust possess administrator rights. Such rights allow you to exercise control over the file system at the administrator level and be responsible for delete most Windows 10 files .

    How to check administrator rights on Windows 10

    START menu and Change account settings records

    Your account name should be labeled Administrator

    If the first option to delete files did not help, then the following options are suitable for removing residues (garbage) from incorrectly deleted programs or applications. Using these methods, you can delete file not deleted without rebooting the system.

    All ways to delete files from a computer

    1. Rename the deleted filereplacing its name with an arbitrary one. After rebooting the system, it will become possible to delete the file, since Windows 10 will stop protecting it from deletion, since we renamed it.
    2. Clear all additional attributes. Open the properties of the selected object through the context menu, remove the “checkmarks” from its additional attributes, in particular, removing the “read-only” and “system” properties, repeat the deletion procedure,
    3. Open the file in a suitable program. If the object is typical (for example, a text file with the appropriate extension), try opening it in the appropriate program, then change the contents and re-save by making the deletion again,
    4. Check the dates. If the file properties contain clearly incorrect creation and change dates (differing by decades or more), try changing them to realistic ones using the Advanced Properties tab
    5. Download in safe mode. Perform a classic restart of Windows 10 through the Start menu, while holding Shift - after its implementation, you will be shown a screen for selecting parameters, where you need to go through the sections "Troubleshooting", "Advanced Settings", "Boot Options", after why press the "Restart" key. Wait for the process to complete and when a list of parameters appears, press F4. In the loaded safe mode, try deleting the file in a regular way,
    6. Using resuscitator or LiveCD / Flash. Boot from any available LiveCD / DVD or flash drive, regardless of the system installed on it (Windows, Linux, etc.) - the main thing is that your OS on the hard disk does not participate in the process. Try to delete the file,
    7. Connect the hard drive as a drive to another PC. In the absence of LiveCD / Flash, you can simply connect your hard drive to another PC through an external "pocket" or by directly connecting to the SATA (or other interface that your hard drive uses) cable, and then repeat the original operation with the file.

    Description of the problem

    If you open a certain file of a registered type in the corresponding program, for example, a text editor or music player, it cannot be deleted just like that, switching from the editor to Explorer and pressing “Delete”. The operating system will not allow erasing the data that is currently used in the PC. In this case, one process (launched by the user) tries to erase the file from the storage medium, and another process (launched by the operating system or another program) blocks the delete operation, believing that this will lead to a malfunction or some other problems.

    In fact, each of these processes is important and necessary, but it happens that the file to be deleted is not opened by any program, and at the same time, the OS does not allow it to be deleted. As a rule, this is due to such reasons:

    • Incorrect closing of the file by the program or incorrect termination of the program itself in the last session of its operation.
    • A virus has entered the PC, and when trying to remove an infected program or the virus itself, it tries to defend itself, preventing it from easily eliminating itself.
    • The OS believes that some other user is currently working with the file - either from the same PC, or over the local network. Is this really so - it may not be known, or it is even known that there is no other user and cannot be. But to delete such a file in any case does not work.

    Below, we’ll look at a few ways you can solve the problem of undeletable files.

    Simple removal methods

    Initially, we suggest you use simple methods to solve the problem (listed in order of speed of execution):

    • Reboot the PC. Oddly enough, but quite often it is this simple measure that allows you to complete the work of all OS processes and then successfully delete an unnecessary file.
    • Try to rename the file, if possible - then try deleting (do not forget to copy this file in advance if you may need it later).
    • Transfer the file to another logical drive / flash drive. If it works, delete it already from a new place.
    • Check the file attributes (you can change them in the "Properties" context menu item). Remove the attributes “read only”, “hidden”, “system”, “archive” and try to delete again.
    • Check the date the file was created and last modified. If it is clearly inadequate (according to the OS, the file was created in 1980 or the last time was changed in 2060), try changing the date to a realistic one and delete it.
    • If this file is typical and with the ability to change (for example, a text file in the format for “Word”), try opening it in the program corresponding to the file type, somehow change the contents, save the data in the new version, close the program and try to delete . The same method may work with non-standard files, but the probability of a successful outcome is reduced.

    A fairly simple method for deleting “busy” files and folders using the “Resource Monitor” and ending the blocking process is described in a short understandable video:

    What should I do if I cannot delete a file / folder due to access rights?

    No access to file / folder. To delete this file / folder, you must have “Administrator” rights - if such notifications appear when you try to delete a file / folder, you need to reconfigure the access rights. To do this, you will have to do the following manipulations (example deleting a folder):

    • We right-click on the folder, select "Properties" - "Security" - "Advanced".
    • In the line "Owner" we change the user to the one under which you are currently working in the system. To do this, you can click "Check Names", then put a bird in the line "Replace the owner of subcontainers and objects" and click "OK".
    • The Windows Security window will appear and for some time the OS will do a “Change of Owner”. Next, the PC asks: “Do you want to replace the permissions for this folder so that you have full access rights?”. Answer - "Yes."
    • Then again we see the "Properties" window, the "Security" tab. Click the “Change” button with the shield drawn, that is, just change our access rights to this folder, including the right to delete. For each user, put a check mark in the top line “Full access” and “OK”.
    • You will have to wait a certain period of time, now your access rights to the folder and objects inside it will already change. Do not forget to uncheck the "Read only" checkbox in the "General" properties tab, and confirm this change of attributes.

    All manipulations to delete a locked folder or file can be seen in the video:

    What programs can delete undeletable files?

    If none of the above methods helped, then in this situation you already have to use tools to delete files.

    One of the most popular file removal tools in the CIS that do not want to be deleted is Unlocker. It can be downloaded by clicking on the link to the developer's website: www.emptyloop.com.

    There are both installable (built into the operating system) and portable versions. Each version has its own minor advantages and disadvantages, but a portable version is recommended for a one-time removal. However, if you regularly experience problems with deleting files, it is better to install Unlocker.

    During installation, it is possible to install Unlocker Assistant. This assistant program is constantly visible in the "Taskbar" and will be automatically launched in cases where there will be problems with deletion.

    Using the portable version of the program is very simple:

    • Launch Unlocker.
    • In the window that opens, select the desired file, and you will see processes that do not allow it to be deleted. These are "blocking descriptors."
    • At the bottom left there is an opportunity to choose options for actions - delete, unlock, transfer.

    The principle of using the installed version is almost identical:

      Right-click on an intractable file. In the context menu there will be an item of the same name with a magic wand and an asterisk. Click on it:

    Further - the same options.

    Accept and reboot.

    The following is a video that details how to work with the program:

    Unlocker Analogs

    Unfortunately, the official support for Unlocker ended on Windows 7 (which usually does not prevent it from working properly for later versions of the OS), but for failure-free operation under Windows 8 and Windows 10 it is better to use IObit Unlocker. The interface is very similar, Russified and in general does not cause any difficulties.

    Unlike the previous program, this without fail will need to be launched on the computer in order to delete the necessary file. You can download the application from the link: http://codedead.com/?page_>
    Instructions for using the program:

    • Open the application and go to the “File” tab.
    • Select the file to be deleted.
    • We click on the file with the right mouse button, then select “Unlock” (unlock) or “Remove” (delete).

    The disadvantage of this program is that it only supports the English interface.

    Using Live-CD or Live-flash

    A radical way to get rid of an unnecessary file is to launch the operating system not from the hard drive of your PC, but from a Live-CD or Live-flash. But for this you need at least the Live-CD itself plus a drive for it. Лучше, если есть Live-flash (то же, но на флэшке, дисковод не понадобится), тут хватит и USB-порта:

    • Вставьте Live-носитель в ПК, загрузитесь с него (может понадобиться вход в BIOS).
    • Найдите неподатливый файл на вашем HDD и сотрите его. ОС с Live-носителя возражать не будет в любом случае, поскольку для нее любой файл на Вашем ПК – инородное тело.
    • Выключите ПК, извлеките Live-носитель и загрузите компьютер. Ранее неудаляемый файл будет удален.

    Неуверенным пользователям от такого способа лучше отказаться в пользу использования специальных программ, описанных выше.

    Чем удалить неудаляемые программы

    Некоторые фирмы делают так, что после установки их программ на вашем ПК оказываются какие-то дополнительные совершенно ненужные вам программы, причем вы не давали сознательного согласия на их установку. If it is not possible to remove such programs from the list of “Programs and components” using regular means along such a path as “Start” - “Properties” - “Programs” - “Uninstall a program”, uninstaller programs will come to the rescue:

    • Revo Uninstaller Pro is one of the most popular programs for uninstalling other programs. Russified. Completely deletes all references to the removed software not only from the disk, but also from the registry. There is autoload management, permanently erases not only programs, but also unnecessary files, cleans browser histories (not all, can be checked by version) and document history in MS Office, automatically updated. The unique “hunter mode” allows you to find and delete a program that is not listed in the list of programs.
    • IObit Uninstaller Free - removes the entire package associated with an unwanted program. In addition, it has the function of forced removal, which helps to demolish the most "stubborn" programs. Allows you to "roll back" Windows updates. Disables browser extensions and plugins. Creates a list of installed programs and saves to a file. Keeps a history of his work (removal of programs).
    • Advanced Uninstaller Pro. Deletes cookies, sets toolbars in browsers. Optimizes the registry file. There is even a font manager for Windows!

    If the case turned out to be very difficult, try paid versions of uninstallers, for example, Uninstall Tool. If they did not help, it remains to contact the support service, where a qualified specialist will help you.

    How to remove deleted files from a flash drive

    Most of the above methods are suitable for deleting files from a USB flash drive. In addition, you will always have in stock the "last argument" - full formatting. After it, there will be no files, folders, or viruses on the flash drive.

    So, if there is such a situation when it is impossible to delete a file by conventional means, because the operating system (more precisely, some visible or hidden process) believes that the files are still in operation, you can use the above instructions to successfully delete and get rid of an unnecessary file.

    What may interfere with the deletion of a file or folder

    If you do not have the necessary rights in the system to modify the file or folder, you cannot delete them. If you did not create the file, then there is a possibility that you cannot delete it. Also, the settings made by the administrator of the computer may serve as the reason.

    Also, a file or a folder containing it cannot be deleted if the file is currently open in the program. You can try to close all programs and try again.

    Why, when I try to delete a file, Windows writes that the file is in use

    This error message means that the file is being used by the program. Thus, you need to find a program that uses it and either close the file in it, if it is, for example, a document, or close the program itself. Also, if you are working on a network, the file may be used by another user at the moment.

    After deleting all files, an empty folder remains

    In this case, try closing all open programs or restarting the computer, and then delete the folder.

    And suddenly it will be interesting:

    Why not subscribe?

    Distribution of new, sometimes interesting and useful materials from remontka.pro. No ads and free computer assistance to subscribers from the author. Other methods of subscription (VK, Odnoklassniki, Telegram, Facebook, Twitter, Youtube, Yandex.Zen)

    02/23/2017 at 11:34

    Hello!
    Thank you for the article. My video file (not finished series of the series from rutracker) is not deleted, even in XP safe mode, and is not renamed. Delivered to DeadLock, it was installed, but does not want to start, writes that "It is not a Win32 application." I read the reviews - no one writes on the series page about such a problem with the series. It is not clear what to do, but it seems DeadLock will have to be deleted for uselessness

    05/20/2019 at 17:06

    I deleted such a tenacious file very simply - sent to the archive and then deleted. first the file and then the archive. and did not have to rack their brains as advised here.

    05/20/2019 at 17:12

    Friends, I sent the arrogant file to the archive, noted to delete the end after packing and the case.

    03/13/2017 at 11:37

    Bullshit is all - I'm talking about an article that the author wrote down. Unloker - it’s like that .. It forces us to install adware, which is then harder to remove than viruses. In Windows 8.1, I could only delete an empty file by going to the Command Prompt with Administrator rights. The file was problematic: 0 bytes (cannot be read), name in Cyrillic (cannot be recognized by old MS-DOS), in the system Downloads (not demolished, attribute “Read-only”), and the file itself with attribute A (journal, “the contents are not change, only replenish ”).
    We go to the start menu, click on the icon with the right button, select.
    In the black window, we go to the directory in which I sat, I had cd c: \% username% Users (in this directory was Downloads, with a frozen file).
    We save for the time being the rest of the files from the folder (for example, Downloads) somewhere else.
    In the black window we type the second command erase / a / f / r / s -or-where-y-you-there-sits-this-nits, keys
    / f - completely erase the file, regardless of the attribute
    / r - erase, even if the attribute is read-only
    / a - erase, even if the attribute "A -" journal "is
    / s - erase in subfolders too, of all levels
    All. We type exit at the command line, throw useful files back into the cleaned folder, and enjoy life and ourselves.

    03/16/2017 at 17:46

    just erase space + file name helped. THX!

    03/26/2017 at 22:26

    Hello colleagues. can someone tell a weak user? - downloaded an MPEG video file, size 156mb - and does not want to be deleted! I bring the mouse, I right-click to select and delete - after a few seconds of thought, it closes the entire folder where it is located. He divides the ignore, he doesn’t go to the basket, he somehow lured him there, so after trying to empty the basket, close it. In general, all the simple and accessible methods have crashed. I downloaded the free trial version of Avira, it doesn’t find anything. Help me please.

    03/27/2017 at 09:01

    Try in safe mode. If it won’t work there, try the same there, but uninstall using the command line:

    03/27/2017 at 13:12

    Safe mode, command line - for me it is a Chinese letter .. I will try to delete the entire downloader folder. Anyway, thanks for the help.

    04/03/2017 at 21:58

    The same trouble on win 10 was with the MP4 file. Long steamed, why did not try the current! In the end, it was decided as always simple (in a dream I dreamed, by the way, that decision). I created a folder on the hard drive (on drive D in my case) next to the problem one and transferred the working files and folders there, and the file that conflicted and didn’t open in any was left alone and took the folder to the trash

    12/05/2017 at 12:42

    Thank you, I did so, first a folder, there are pests, then into the basket and empty the basket. Hurrah

    04/17/2017 at 16:51

    help me, I have such a problem, I want to delete the file in WinRaR Archiver but it says that the source it is open in and I looked in the task manager it is closed where it can be located help please IF I AM ON Win 10

    04/18/2017 at 10:51

    I did not quite understand exactly how and where you are deleting the file from the archive? And if not, why through WinRAR? And if in safe mode to repeat?

    06/05/2017 at 12:35

    Thanks you!
    I downloaded minecraft, but something went wrong and I wanted to delete the game, but it was not deleted. The hour was tormented! But then I found this site and deleted it!
    Thank you, you are my salvation

    07/11/2017 at 12:39

    People! All this garbage is written here) It’s easier to take a folder through the file with 7zip, rename it and delete it took me three seconds, and the problem started with which, I downloaded a song, didn’t download it, canceled it and it hung file in the download folder, size 0 bytes.

    07/17/2017 at 10:49

    This really works. Easy, simple and fast! Thank you very much!

    08/09/2017 at 20:49

    Well done! As I just did not try to delete the same 0th music file. I downloaded a bunch of prog to remove "undeletable" files. Nothing helped. Then, already quite desperate, I stumbled upon your pussy (accidentally not to call it, excuse me) and lo and behold! Everything turned out, the zero file was deleted which was an eyesore for two months already. Thank you very much. It is interesting that some kind of program for archiving easily coped with what the programs for removal are created for.

    06/03/2018 at 18:51

    7-zip is generally a useful thing.

    08/19/2017 at 12:13

    Yes! It really works! Before that I tried a bunch of everything, and it did not help! I had a file of zero length. Thank!

    11/09/2017 at 13:50

    Wow! Stunned. Really works! I hung a folder - 9 Gigabytes. Unpacked onto the screw Windows distribution, I tried to make myself a Lite version, I don’t remember what tools. So I could not delete this folder, all the time there are no rights there, and so on. I went through different unlockers, tried manually - all to no purpose. And so he took the 7-zip and in five minutes erased this blocked folder. Five minutes because there were several tens of thousands of files. As Toha wrote, he did so - he renamed it directly to 7-Zip and deleted it in it. And that’s all. And before that, the hour was beating, no less.

    11/15/2017 at 13:55

    Thanks a lot. All of the above did not work. Your way has helped.

    Pin
    Send
    Share
    Send
    Send