Why can't I delete files from my computer? Simpler options

There are situations when a user wants to close or delete a file, but cannot do this because it is “opened in another program” and then he starts looking for information on how to delete this open file.

It will be useful to consider all the ways in which such a problem could be solved and a given task accomplished. One of them will definitely suit you.

Via command line

To use this method, you must open the command prompt as an administrator.

This is done as follows:

  1. In the "Start" menu (Windows), open "All Programs" and in the "Accessories" section find the "Command Prompt" item.
  2. Right-click on this item and select “Run as administrator.”
    Then on the command line you need to enter the following command:

net file [file name] /close

For example, if the running file is called “geek-nose.exe”, then this command will look like this: net file geek-nose.exe /close

If you need to find out the name of the running program, it is written in the message about the open file.

Via task manager

Knowing the file name allows you to use another method to delete files open in other programs.

In fact, this method implies that the user will close the program in which the file is open.

To open the task manager, you need to press Ctrl+Alt+Delete or Win+X and select “Task Manager” from the list of options.

You can also right-click on the bottom panel and select “Launch Task Manager” from the drop-down menu.

In the “Applications” tab, you need to find the required file and click on the “End task” button. You can also right-click on it.

In the drop-down list, click “Go to process”. After this, we will be taken to the “Processes” tab, there again right-click on the specified file and select “End process” in the drop-down menu.

After this, you need to try deleting the file again.

If it still does not delete, you can try clicking on the “End process tree” option.

It is possible that some program that is located one level higher or lower in the tree does not allow this. Not working? Then we move on to the next method.

Using the Computer Management menu

This method involves performing the following actions:

  1. Launch the “Computer Management” menu. The easiest way to do this is to search in the Start menu (Windows).
  2. In the menu on the left, first open “Service”, then “Shared Folders” and “Open Files”.
  3. In the menu that opens, right-click and select “Disable all open files.”

You may see a list of all open files. Then you can right-click on each of them and select disable.

But in our case, nothing was displayed in this list at all - despite the fact that quite a lot of processes were running on the computer and many files were open.

This means that the computer management menu does not always work correctly and display a valid list of open files.

Attention: Even if nothing appears in the Open Files folder of the Computer Management menu, you still need to right-click and select Disable....

Now you can try to delete the file again.

Unlocker

This little utility is very easy to use and allows you to delete files opened in another program in a matter of seconds. You can download it on the official website. After installation, it will be integrated into the context menu (the one that opens by right-clicking on any file or folder). To use Unlocker to delete open files, you must do the following:

  1. Click on the file that is not deleted and edit it with the mouse button. Select “Unlocker”.
  2. Among the actions, select “Delete”. You can also click the “Delete process” or “Unblock all” buttons.

Then you need to try again to delete the file in the standard way. There is another program that can also unlock various files and thereby allow the user to delete them. It's called DeadLock.

Using DeadLock

Recently, a huge number of unwanted programs and even viruses have been installed along with Unlocker. This even applies to the installer from the official website. In addition, antiviruses and firewalls are increasingly blocking Unlocker. Therefore, DeadLock looks like a very worthy alternative. You can download it, for example, . Next you need to do the following:

  1. Drag the desired file into the program window with the mouse cursor.
  2. Right-click on it and select “Unlock”, then “Unlock” again or “Delete” to immediately delete it.

Uninstall in Safe Mode

You can also try to delete the file while the system is booted in safe mode. In order to run it this way, you need to press the F8 button when starting the computer and select something related to safe mode from the list of options. In most cases, it is called “Safe Mode”.

You can try to combine this method with one of the above. For example, when the system is loaded in safe mode, you can unlock the file through DeadLock or Unlocker, if they are installed on the computer.

Using a boot disk or flash drive

This method is very similar to the previous one. Only here we start the system through safe mode, and through a boot disk (aka LiveCD).

Nowadays you can download many such images on the Internet. You just need to burn them to a flash drive or CD/DVD and boot from it. This stage in this case is the most difficult - you need to launch the boot menu and select boot from a flash drive/disk there.

To do this, insert the storage medium into the computer, reboot it and see the prompts for starting the boot menu.

In most cases, something like this will be written somewhere: “Press F5 to run boot menu.” Accordingly, in this case you need to press F5.

After this, a menu will appear in which you need to indicate what the system will boot from. In our example, this is “Flash drive...”.

Finding out the desired option is very simple - if it is a flash drive, then the word “flash” will appear in the name, and if it is a disk, then “CD” or “DVD”.

Next, you will boot from a bootable USB flash drive or disk. The LiveCD interface may be similar to Windows or Ubuntu, but in any case, when you right-click on a file, you will see the “Delete”, “Delete” or “Cut” option.

The user just has to click on one of them.

Simpler options

Sometimes there is no need to resort to such radical methods as described above. One of these much simpler methods often helps:

  1. Restart your computer. It is quite possible that after a reboot, all processes will be terminated, including the one in which the file to be deleted is open.
  2. Uninstall the program that opens this file. After this, all processes associated with it will also be completed automatically.
  3. Perform a full scan of your computer for viruses. In some cases, the file does not close due to a banal virus, and after removing it, everything falls into place.
  4. Disable your antivirus. It happens that some files are blocked not by the system, but by an antivirus program. Accordingly, then stopping its work helps to calmly work with the file.
  5. Log in as administrator. Sometimes a file cannot be deleted due to insufficient user rights.
  6. Just move the file to another folder.
  7. Try rolling back the system to the moment when the file was freely opened and deleted. To do this, go to Control Panel, select Recovery, then click Run System Restore.
  8. After this, click on the desired backup option (it’s easy to navigate by the time of creation) and click “Next”.

Another interesting way to delete an open file is shown in the video below.

Any computer user has at least once encountered a situation where a seemingly simple procedure, such as deleting a file, ended in failure. If this has not happened to you, then either you know how to prevent this situation, or you still have it ahead. That’s why today we’ll talk about how to delete a file or folder that cannot be deleted, and we’ll give several methods for solving this problem. We will help those who are faced with such a situation to solve it; for those who are new to this, they will be fully armed and ready to deal with undeletable files.

Reasons why a folder or file is not deleted

The inability to delete a file can be explained by several reasons:

  • Insufficient rights to perform the delete operation.
  • The file is being used by another user or program.
  • The folder or file is damaged.
  • The media on which the file of interest is located is protected from writing, and therefore from deletion.

You can solve the problem that has arisen in different ways: use the capabilities that exist in the operating system, or resort to the help of third-party utilities that are designed to perform similar actions. Let's look at all the methods for getting rid of unnecessary files.

You just need to make one caveat - are you sure that the file intended for deletion is really unnecessary? Windows OS protects the folders and files necessary for its stable functioning, and attempts to insist on one’s own way can lead to the “crash” of the system and the need to solve completely different problems. Before you start deleting files, make sure that they are truly “garbage”. You should be especially careful when disposing of objects in system folders.

Checking write protection

Before you start any drastic methods, you should make sure that you have the right to delete files. If they are located on flash drives or memory cards, then you need to start with the simplest thing - make sure that the mechanical switch that prevents writing/erasing is not set to the appropriate position that blocks such actions.

Virus check

The file may be a virus, some kind of malicious program, or part of it that cannot be removed. If you haven't scanned your computer for viruses in a while, you should do so. If suspicious programs have been found and neutralized, you should try to delete this file.

Checking file access

A helpful way to delete a file in some cases is to restart the computer. It is quite possible that the object that needs to be gotten rid of is the result of a particular program that was uninstalled incorrectly, or it was not done completely, and there are some program modules (DLLs, processes) left in the system that are still running and do not allow deletion. It is quite possible that after restarting the system, unnecessary processes will not work and the file will be freed from unnecessary care. Delete.

Another point is the prohibition on performing write/erase operations in this folder, set by the computer administrator. You need to go to the folder properties, and on the “Security” tab check the granted rights.

If read-only is allowed, then you should give full access to this folder, after which it will be possible to perform any actions with all the files located in it. You should be especially careful with system folders.

Using Task Manager

If, when trying to delete, a message is displayed that the file is open in another program, and a specific process (program) is indicated, then the situation is somewhat simplified, since it is known what exactly is preventing us from getting rid of the file that has become unnecessary.

To do this, simply close this program (if possible), or stop the running process. To do this, you need to open the “Task Manager”, which can be done by pressing the key combination “Ctrl” + “Shift” + “Esc”. After this, on the “Processes” tab, you need to find the process blocking access to the file and terminate it.

After this, you can try to delete the file. Most likely it will work out.

Using the Command Line

The file may be held by the “explorer” system process, which is responsible for the operation of the taskbar, desktop, etc. If you simply kill this process, deleting the file may be problematic. At the same time, the command line will allow you to deal with those objects that cannot be deleted using Windows Explorer.

In order to use this tool, you need to launch the command line, for which, after clicking the “Start” button, enter “cmd” in the search field, right-click and select run mode with administrative rights. A window will open in which you must enter commands to delete the file or folder.

You can try to delete the damaged file using this method.

Deleting a file

The "Del" command is used. You need to enter the line:

Del /F /Q /S<Путь_к_файлу> ,

/F – Forces deletion of files marked as read-only.

/Q – do not issue a confirmation request for the delete operation.

/S – delete subfolders and files in them.

The screenshot shows an example. Naturally, your path will be different.

Deleting a folder

To delete an entire folder, use another command:

Rd/S/Q<Путь_к_папке> ,

/S – delete subfolders and files.

/Q - do not issue a confirmation request for the delete operation.

An example is shown in the following screenshot.

Using Safe Mode

If you cannot stop a process blocking access to a file for one reason or another, or it is unclear what process is interfering, then this method can help, in which the system boots in safe mode. In this case, the required minimum of processes starts, and the one that “held” the file will remain in an inactivated state. You can try deleting the file.

Using a boot disk

It happens that even safe mode does not allow you to get rid of an unnecessary folder or file. Then booting from an external boot drive may help. Alternatively, the hard drive on which you want to delete files can be connected to another computer. Then, after booting from another media, your disk will be connected as a second (third, etc.) disk, the OS on which will not be running. Now all that remains is to find the desired file and delete it.

Using third party programs

In order to solve all problems with access to files and be able to delete them, regardless of whether they are in use or not, there are a number of utilities specifically designed to unlock objects to be destroyed.

FileASSASSIN

A free utility that you can download from this link. Among the advantages of the program are a simple interface, the ability to launch from the command line, unlock and (if such a mode is specified) delete a file.

To get rid of an unnecessary file, you need to specify the path to it, check the “Delete file” box and click the “Execute” button. That's all that needs to be done. If you don’t want to work with the command line, and also don’t want to delve into processes and running programs, then this method is an opportunity to quickly and effectively solve all problems with locked files.

Unlocker

Perhaps the most famous program, known for a long time and often used. You can find it at this link, where there are the necessary versions for 32 and 64-bit OS. There is also a portable version for those who do not like to install many programs on the system, but prefer to run the necessary tools to maintain the system autonomously.

There is one more advantage to using portable versions: when installing such programs, you often install several more utilities, browser extensions, etc., which you don’t need at all, which will annoy you with advertising, and from which, sometimes, you don’t really care. just get rid of it. You have to be careful when installing such software. As a rule, this does not happen with portable versions.

The program itself is extremely simple. When launched, a window will open where you need to specify the location of the file that needs to be deleted.

You just need to click the “Ok” button, after which a new window will appear in which you will need to confirm the action that needs to be performed on the file. If no file locks are found, the following window will appear:

You must indicate what to do with the file - delete, leave as is, move, etc.

Other programs

In addition to those listed, there are other utilities that perform the same job. As an example, we can cite: Delete Doctor, Free File Unlocker, MoveOnBoot, Tizer UnLocker, Wize Force Deleter. Their operating principle is similar, so you can choose the one you liked and which helped solve problems with undeletable files or folders.

Conclusion

How to delete files or folders, which method to choose - it all depends on the specific situation. Some people prefer to use specialized software, others do not like to clutter the system with many highly specialized utilities and prefer to use all the built-in capabilities of the OS.

The main thing is to have an understanding of different ways to solve problems and the ability to apply them in practice. We hope that at least one of the methods we suggested helped you.

Quite often people face this question: how to delete a file that won't delete, and the file can be contained both on the hard drive and on media. As a rule, to perform this action, just select the file and then press the Delete key. However, this simple manipulation may not help in all cases.

Instructions for deleting a non-deletable file

So let's look at how we can delete a non-deletable file.

  • Perhaps the file is involved in a specific process that is currently running on the device. In such a case, the system will give you a corresponding notification. You will need to close all programs and folders, and then try again.

  • If this message pops up again, right-click on the taskbar, then open “Task Manager”. The “Processes” folder will open in front of us; there we look at the running file of the same name. Mark this process and click on the icon "Finish". A system completion warning will pop up in front of you, which you will need to confirm, and then try to delete the file again in the usual way.

  • If you are unable to remove the executable file, then it may well be a virus utility. You must enter the operating system through safe mode. To perform this action, when you turn on the computer, press F8 key, as a result of these actions, a menu will open in front of you in which you can select the download method. Select “Safe Mode” from the list, and then perform a standard file deletion.

  • To delete files that cannot be deleted, the special Unlocker program will do; by the way, it is free. You need to download it and activate it. When installation occurs, you must carefully monitor what you install. In the first screen that opens in front of you you will need to uncheck the box opposite the item “I accept the license terms...” if you do not want to see an archiver from this manufacturer on your computer. In the next tab, you will also need to uncheck the box if you do not need another program from this manufacturer.

After this program is installed, you will need to right-click on the file to be deleted, and then select the line Unlocker. You will be presented with actions that can be performed; you will need to select delete.

Surely you have encountered a situation where from a computer can't delete file: a window pops up with an error warning, and the file quietly remains in its old place. How to delete a file that won't delete?

Most often, it is not possible to delete a file because it is open in some program: usually applications block operations with files that are currently open in them. For example, you want to delete a text document opened in Microsoft Word. Or you watched a movie and after watching it decided to delete it, but did not close the media player. In this case you need close the corresponding application and try again to send the file to the trash.

If even after this you are unable to delete the file, it is possible that Application-related processes still remain in the computer's RAM: the application seems to be closed, but the system does not consider it as such. There are two options here: either “kill” the corresponding process through, or simply restart the computer. If you do not know what a task manager is, or have a very vague idea about it, it is better to resort to a reboot.

Sometimes the reason for the inability to delete a file normally may be an incorrect name (use of invalid characters in the name). This happens infrequently (usually the system will simply not let you name the file “incorrectly”), but it does happen. This can happen as a result of a malfunction of the program in which you opened/edited the file, or when unpacking the archive. Try renaming the file, perhaps after this you will be able to delete the file that is not being deleted.

If previous methods were ineffective, it may help deleting a file in safe mode. To boot into, you need to restart the computer and when rebooting, until the Windows logo appears, press the F8 key (to be sure, it’s better to press and hold). From the boot menu, select the Safe Mode option and press Enter. After loading the operating system, delete the “stubborn” file. An alternative to booting into safe mode can also be (the disk with the operating system).

But it happens that even in safe mode or when booting from disk, you still cannot delete the file. What to do? To remove particularly “unruly” files, you can use special utilities. One of the most famous such programs is Unlocker. This free utility unlocks files used by system processes, after which you can safely delete, move or rename them.

The program works on both 32-bit and 64-bit versions of Windows. She integrates into the context menu each element of the operating system (shortcuts, files, folders, etc.), so you don’t even need to launch it specifically to delete a file. The utility is available in 40 languages, including Russian.

To delete a file using Ulocker, download the utility from the program’s official website (you can choose 32-bit, 64-bit, or Portable version) and install. Now in the context menu that appears when you right-click on an object, you should see Unlocker item(in the 64-bit version this may be a sub-item in item X64).

If you are unable to delete the file, right-click on it and select Unlocker. A window will open with a list of processes blocking access to the file. Select the action you need to perform on the object (delete, rename, copy or move) and on the process (delete, unblock, unblock all processes). Sometimes, to permanently delete a file using Unlocker, you may need to restart your computer.

As you can see, there are several ways to delete a file that won't delete, and at least one of them should definitely work. By the way, sometimes viruses in the system prevent you from deleting a file, so It wouldn’t hurt to additionally scan your computer with an antivirus program. It definitely won't get any worse.

If the computer reports that the file is open in another program

Most often, the inability to delete a file in Windows is due to the fact that it is occupied by some kind of system process. The message “The action cannot be performed because this file is open in “” appears. Program name».

In this case, you need to close the program that is using the file and try to delete it again. If you see her window, just close it. If a program is running in the background and you don’t know how to close it, launch “Task Manager” (Ctrl + Alt + Del), find this program by name in the list, right-click on it and select “End task”.

If you can't find the program you need in Task Manager, try a third-party utility that removes file locks. The free LockHunter app is suitable. After installing it, right-click on the file and select What is locking this file?. When the LockHunter window appears, click on the Unlock It! button.

After that, try deleting the file again. If unsuccessful, restart your computer and try again. To completely remove it from your computer, be sure to empty the Recycle Bin.

If your computer says you are denied access

Sometimes you cannot delete a file because your account does not have rights to do this. In such cases, Windows reports that access is denied. To resolve this issue, you need to change the owner of the file. During the process, you may need the login and password for your PC administrator account.

To change access rights, right-click on the file and go to “Properties” → “Security” → “Advanced”. Near the “Owner” item, click “Edit”, then “Advanced” and “Search”. Select your current account from the list and click OK.

After doing this, you will most likely be able to delete the file as usual. If it doesn't work, try restarting your computer and trying again.

How to delete a file on macOS

If the Mac says the file is in use

First, manually close the applications in which you used this file and try to erase it again. They can interfere with uninstallation, as happens in Windows. If unsuccessful, restart your computer and repeat the removal.

If it doesn't work, enter safe mode. To do this, restart your Mac while holding down the Shift key. Try moving the file to the Recycle Bin and emptying it, then restart your computer as normal.

If the file cannot be deleted for other reasons

The file may not be deleted due to disk errors. Therefore, launch “Disk Utility” in the Finder → “Programs” → “Utilities” section and check the disk on which the file is located using the “First Aid” service.

After checking, restart your Mac and try deleting the file.