You have realized that the folders already abound on your desktop and, with the intention of cleaning a little and armed with a lot of patience, you have decided to eliminate those that you consider useless. However, after a successful removal, he came across an error that he had actually seen a few times before, but which had not given him weight, something like «The operation could not be completed because the folder is in use by another process"Or worse"Cannot delete folder: unexpected error«.

Before giving up on the idea of ​​living with this folder that just doesn't want to go away, let me give you some useful solutions to solve your problem: in the lines that come, in fact, I'll take care of explaining to you in detail how to delete a folder that is not deleted in all OS of the Pc. Finally, I will show you how to solve a similar problem in Android, in case it arises.

So what are you waiting to start? Take a few minutes for yourself, make yourself comfortable and read carefully what I have to explain to you on this subject: I am sure that by carefully following the instructions I am going to provide you, you will be able to get rid of that unwanted folder and be ready to possibly tackle future similar scenarios. Having said that, I just have to wish you happy reading and good cleaning!

How to delete a folder that is not deleted in Windows

The most common reason folders get stuck windows is in running processes: If a system program or "job" uses a folder (or a file that resides within it) when trying to remove it, the operating system prevents completion of the procedure to avoid behaviors events unexpected from the program in question or from Windows itself. Here are the most effective ways to remedy the problem.

Check running programs

The first thing you should do for delete a folder that is not deleted is to verify that it is not used by any running program: therefore, before trying the removal again, close all active programs on the PC (saving the open work, if necessary) and make sure that there are no applications in the background (i.e. running but invisible) in the system notification area, which you can access by clicking on the arrow up (Windows 10) or lateral (Windows 8.1 and earlier versions) located in the clock area (bottom right).

If this method doesn't work, you can ask for help. Activity management Windows: this program allows direct access to Windows processes, that is, to any running entity (system or not), even if it does not have its own window. To access the Task Manager, press the combination on the keyboard Ctrl + Shift + Esc, or press the key combination Win + R and write the command inside taskmgr.exeFollowed by presentar.

At this point, press the voice. More details placed on the bottom edge of the window and go to the item Processes / Details : Identify the process related to the application that "locks" the folder, do right click in it select the item Final process structure / final process tree from the proposed context menu and confirm the intention to proceed by pressing the button End / End Process Tree. At this point, try again to delete the locked folder.

If you are unsuccessful in your attempt, even in this way, I recommend that you restart your PC and try the removal again; If even the restart is not effective, go to Safe Mode, To avoid the possibility of a crash by a driver or critical startup program, and try deleting the folder again. How to say Can't access Windows Safe Mode? Don't worry - I've provided you with precise instructions in my dedicated guide.

IoBit Unlocker

Failed to delete locked folder with above mentioned methods? So I recommend you take a look at IoBit Unlocker : if you have never heard of it, it is completely free software that allows you unlocking folders blocked by Windows, with the possibility of deleting them immediately or, in case of problems, the next time the system is restarted.

To get started, connect to the download page. of the program and press the button Free download. On the next screen, click one of the two items. Download @ of executions located on the right and wait for the program download to complete.

Once done, start the program you just downloaded and press the buttons yes, siguiente, to accept y siguiente, remove the check mark from the box next to the wording Add IObit to My Favorites, keep pressing siguiente, wait for the installation process to finish and finally press the button final.

At this point, on the main screen of the program that opens, press the button Add and select the locked folder with the help of the proposed File Explorer panel on the screen, then press the button good. Alternatively, identify the "offensive" folder on your PC, click right click in it select the item IObit Unlocker from the proposed context menu and press the button yes.

However, once you add the locked folder to the program, click dart placed next to the entrance To unlock and remembering that the folder can no longer be recovered, select the item Unlock and Delete from the proposed menu and then press the button good and confirm the will to proceed. If the procedure is not successful, repeat all steps taking care to set the check mark next to the item Forced unlock.

Malwarebytes FileASSASSIN

If for some reason the folder is still locked due to some file contained in it, which itself cannot be deleted, you can take advantage of the software Malwarebytes FileASSASSIN - As the name clearly indicates, this program allows you to instantly remove locked files by processes or by the operating system itself, with the possibility of postponing the elimination for the next restart in case of problems.

To use Malwarebytes FileASSASSIN, first download its installation file by connecting to this page of Internet and pressing the button Download placed on top. Once the download is complete, start the installation file you just copied and press the buttons yes, siguiente, put the check mark next to the article I accept the terms of the License Agreement, then click on the buttons siguiente y install and complete the procedure by pressing the button finished.

At this point, click on the button (...), select the suspicious file using the proposed panel, put the check mark next to the item Try the FileASSASSIN file processing method, repeat the operation for the four related elements ( Unlock locked file handles, download modules, end file process y Delete file ) and remembering that the file can no longer be restored, press the button run to complete the operation. Repeat this procedure for all the files included in the locked folder, and then try to delete the folder as usual.

If the procedure is not successful, you can try to delete it when Windows reboots: to do it, import the file to be deleted in the program as I showed you a while ago, put the check mark next to the item Use delete in Windows restart functions and press the buttons run y good. This will delete the file the next time the operating system starts.

How to delete a folder that is not deleted in macOS

As for me Mac and the operating system MacOS, you will hardly need to resort to third party programs to delete folders that are not deleted. If you cannot solve the problem by restarting the Finder and / or interrupting a specific application, you can in fact contact the trustworthy terminal to remove locked folders. Below I am going to explain everything you need to know about it.

Restart the search engine

The easiest method of delete a folder that is not deleted on macOS is trying to restart the discoverer : Although this is a recurring event, it can happen that the administrator of Mac files somehow lock a folder, thus preventing its deletion.

To restart the Finder, simply select its icon in the bar spring using the combination alt + right click, then choose the item reopen from the menu that appears. If even this was not used to unlock the folder in question, try closing all currently used applications - to close a program, all you have to do is select it in the Dock bar to put it in foreground and press the key combination cmd + q on the keyboard Once this is done, try to delete the locked folder as usual.

Use the terminal

If the procedure reported some time ago was not successful, you should only contact the terminal - Before proceeding, however, note that you cannot undo the deletion of a folder (and all the files it contains) via Terminal. Also, make sure write the exact path of the folder to be deleted, otherwise you risk deleting things you don't want.

With these clarifications, it is time to get down to business: first, start the terminal calling it from the folder utility on mac write command sudo rm -rf / path / folder, Press the button presentarwrite the administrator password and crush again presentar. Alternatively, to decrease the risk of errors, type the string sudo rm -rf without pressing Enter, drag and drop the folder you want to delete in the Terminal window (so that its path is added automatically) and after this operation is completed, press the key presentar keyboard and complete the removal procedure.

How to delete a folder that is not deleted in Linux

It is not uncommon for a folder to remain "locked" in Linux - In fact, some applications may "forget" to release files and directories, causing the operating system to believe that they are busy and therefore cannot be removed. In addition, the user may not be able to intervene in the folder, so the operating system could prevent its deletion. In the following lines, I will show you how to remedy these eventualities.

Check running programs

If the folder you want to delete is blocked by a running program, all you have to do is close the application in question (by clicking on the X located in the upper right or upper left, depending on the distribution you use) and try to delete the folder again.

If the blocking program was run on fondothat is, without a visible window, you can close it through System monitor : call the program from Activity view or from the main menu of your distribution, press the button processes, located at the top and identifies in the proposed list the name of the program you want to close (if you want to search by name, you can click on the icon in the form of magnifying glass located at the top and use the search bar that appears on the screen).

Once you find the program in question (eg. soft.bin ), do right click on your behalf and select the item ends from the proposed context menu, then confirming the operation by pressing the button Final process. At this point, you can try again to delete the locked folder. Be aware that shutting down a system process could make it unstable and force you to restart.

Use the terminal

The system monitor was not helpful and the folder is still locked, maybe because you don't have sufficient permissions to delete it? You can fix this using the terminal : In fact, it is enough to give a precise command by acquiring administrator permissions to delete any file and folder present in the system.

Before continuing, be careful: deleting a folder in this way could make the program that is using it unstable or not work. Also, a single typo could lead to the deletion of files that, on the other hand, should not be deleted - so be careful before proceeding this way.

Having made the necessary recommendations, it's time to put it all together: start the terminal calling him back Activity view or from the main menu of the distribution in your possession, type the command inside sudo rm -rf / path / folder / A / delete, Press the button presentar, enter the admin password and press the button again presentar to confirm everything

Again, you can minimize the risk of errors by writing the string initially. sudo rm -rf, but without pressing Enter, complete the command by dragging and dropping the folder to be deleted inside the Terminal, so that the precise path is written automatically. At this point, just press the button presentar and proceed as seen above.

How to delete a folder that is not deleted on Android

If you have come this far, it means that you are perfectly capable of deleting a folder that cannot be deleted from your PC; in your specific case, however, you need something that allows you to do this in Android, as you urgently need additional space which, due to the locked folder, you cannot get.

The first piece of advice that I think I can give you is restart Android in safe mode and try to delete the folder from there uncomfortable. To do this, press and hold the physical shutdown button on the terminal, then perform a long touch on the virtual button resume that appears on the screen and press the button good when the reboot notification appears in safe mode. Once the bulky folder is removed, you can exit safe mode by simply restarting the terminal!

How do you say this solution did not work either? As a last resort, you can try doing it using the root permissions (here a guide on how to get them) and a special file manager advanced like Root Explorer. However, I want to immediately warn you that the root procedure, as well as deleting a locked folder (worse if it belongs to the system) with elevated permissions, could seriously compromise the operation of the terminal in your possession: perform these procedures only if you are completely convinced of what he is about to do.