Ways to Delete Files that Cannot be Deleted on Mac

Are you failing to delete files on Mac? Then this article is a must read for you to explore the best solutions.

Jun 22, 2020 • Filed to: Solve Mac Problems • Proven solutions

0
“Agh! Why I can’t delete a file?” is a common frustration with most Mac users. Usually, you find yourself having no clue on what to do next. Well, this article will guide you to your next and final step.

There are various reasons to delete a file. However, whatever reason you might have, your Mac might not agree with you.

Since the creation of on-screen technologies, terms such as "delete", "erase", and "format" has been the go-to options in situations where somebody wanted to get rid of a file or application. Also, to safeguard a system in terms of freeing up space or easy removal of malware, the delete key has been beneficial.

However, in recent versions of operating systems, we have been unable in some cases to delete files from our computers. You have probably faced warnings such as ‘folder in use, cannot delete.’

So, how to delete files that won’t delete in Mac?

Well, we shall explain why you can’t delete a file and also the solutions in the sections below:

Part 1. Why I Can’t Delete File on Mac?

You have often wondered why you can’t delete an app on Mac. The presence of a Trash bin on Mac has always made it easy to sort out what you don’t need. However, this is not true.

There are underlying obstacles that can hinder you from clearing your system of specific files. At times these hindrances save us from deleting sensitive data, probably those required by the system to run.

However, the obstacles can, at times, go overboard. It is when you are unable to get rid of the average local files that you know are not useful to you and the system.

So why would the system or anything else keep you from doing so?

Well, some of the reasons include:

  • Your Mac system locks the file: Mac locks sensitive system files that are a must for its operations. When deleted, their absence can cause your Mac OS to ‘break.’ It might not even be able to boot up.
  • The file or folder is in use and can’t be deleted: Mostly happens when a file, e.g., a word document is opened and is in use. It prevents the disruption of your ongoing work. You might have wanted to delete the data accidentally.
  • An app has locked the file: When an application is developed such that its files cannot be tampered with, e.g., to prevent them from being edited or copied, they might be locked. It is thus a security measure for the program with regards to copyright restrictions.
  • The file is not available: Sometimes files are visible but cannot be accessed for one reason or the other. These could be music, documents, or a folder. Usually, they are ‘ghost files.’ You can’t delete such files because they are not there in the first place. It could be a thumbnail left behind.
  • Presence of a Finder bug: A bug, in this case, is a glitch of some sort that prevents the system or an app from carrying out its normal operations.

Part 2. Can't Delete Files? Go to the Finder

Usually, the most natural solution to cannot delete files is by dragging them to the Trash. In case you'd want the data back, command + Z would automatically undo your action. To empty Trash, you can access Finder by either double-clicking the Trash icon on your dock or go to the top left section on your Mac and select 'Finder.'

From the Finder menu, you can click on Empty Trash. Also, from the Trash icon at your dock, you can right-click and select Empty Trash.

select-scan-location

But that doesn’t always work. An error “file can’t be deleted” may pop-up to alert you of this. In such a scenario, you can do the following:

Solution 1. Relaunch Finder

  1. Simultaneously press Command + Shift + Escape.
  2. On the menu that pops up select Relaunch

relaunch-finder-2

Make sure that the Finder loading is complete before you can start deleting.

Solution 2. Force quit Finder

There are several ways to force quit Finder. From the Apple logo at the top right.

  1. Click the Apple logo.
  2. From the menu, click on "Force Quit Finder".

force-quit-finder-3

It is the general way of doing it.

Solution 3. Secure Empty Trash

If you are familiar with the Terminal, you can use the ‘killall’ command to force quit Finder. After the successful deletion of a file, you may not be able to empty Trash as the file can’t be deleted from the Trash.

  1. Go to Finder on the top left.
  2. If Empty Trash didn’t work for you, select secure Empty Trash under it.

    secure-empty-trash-mac-4

You can also press command and right click the Trash icon to secure empty Trash.


Part 3. Cannot Delete Files? Fixes Without Finder

Where the Finder method of deleting apps has not worked out for you, try the following:

Where the item is a folder, delete each file manually to isolate the single erroneous file. If all files get deleted such that the folder is empty, try Trashing it.

Change permissions to empty the Trash. This method makes use of the Terminal using the command ‘chflags’.

  1. Go to Finder on the top left.
  2. If Empty Trash didn’t work for you, select secure Empty Trash under it.

    launching-terminal-5

  3. Change the folder to that of the Trash. Type “cd ~/.Trash” without the quotes.
  4. Change permissions by using “chflags -R nouchg ” without the quotes.

    force-empty-trash-6

The command line can also be used to forcibly empty the Trash using the command ‘sudo rm -rf’. Beware, this command erases everything in the Trash without warning.

<

  1. Open the Terminal as described above. Also, you can use the spotlight to search for Terminal
  2. In the Terminal, change to the Trash folder as described above.
  3. Type “ls “to get a list of files in the Trash.
  4. Remove the specific stubborn file by typing “rm file.png,“ where the data is the item of your choice.

Using the sudo command erases everything in the Trash. Thus, you should only use it if you know what you are doing. You can also do a workaround.

force-empty-trash-7

  1. Create a file or folder with the same name as the file that can’t be deleted but in a separate location.
  2. Move this newly created file to the same location as the stubborn one and allow it to replace.
  3. The previous one automatically disappears. Now you can quickly delete the new one.
  4. Create a folder into which you then move the items you want to delete. The newly created folder will hopefully have permissions different from the previous one.
  5. Lastly, try to log in using an admin account. It will give you more power over your content.

If you accidentally deleted important files, just jump to Part 5 for the solutions or directly download Recoverit Data Recovery. It will help you recover all deleted files.


Part 4. Can't Delete File Because File Is in Use on Mac

When MacOS thinks the file you are trying to delete is in use by another process, emptying the Trash will not work. Therefore, the first thing to do is to quit all other programs to ensure no other application could use any of the files on your Mac.

To force quit apps on the dock:

  1. While pressing option on your keyboard, right-click on the app.
  2. On the menu that appears, click on force quit.

    force-quit-apps-from-mac-dock-icon-8

With this method, you’ll have to quit all apps one by one.

Using the Apple menu:

  1. Click on the logo on the top left.
  2. On the drop-down menu, select Force Quit.
  3. On the next menu of available apps, select the app, you would want to quit and click on the Force Quit button.

    force-quit-menu-9

After force quitting all apps, now try deleting the file or folder.

If force quitting all programs doesn’t work for you, you can try restarting your Mac or even shutting it down then power it on.


Part 5. How to Retrieve Deleted Files on Mac

In the process of trying to delete one file, you can end up deleting several of them, and in extreme cases, you might get frustrated and accidentally format your drive.

However, that is not the end of the road. Wondershare offers you Recoverit Data Recovery Mac version 8.0. Recoverit data recovery software is a suitable comprehensive way to cater for recovery options irrespective of how data was lost.

The software has access to various storage devices including a corrupted Mac Hard drive, USB drive, iPod, SD card, etc. featuring compatibility with FAT 16/32, NTFS, and HFS+ file systems.

  • A more organized main menu page: The main menu now displays drives that are both internal and external, including lost partitions.
  • Enhanced precision: You can now choose the specific location on which to run a scan.
  • Enhanced retrieval of files: Recoverit can now retrieve raw files from internal drives and other external devices that even the computer cannot recognize.
  • Better preview of images: When scanning for images, recoverit data recovery software offers a sneak preview of images, videos, and documents in a larger window to enhance the experience.
  • Allows for recovery of data from Drone camera and GoPro
  • It’s able to recover files from more than ten drives.

So, how do you use Recoverit to recover lost files?

Step 1. Select a location where files are deleted

Launch the software and select the drive from where the data files are lost. If you don’t know which drive to search, tap on the “I can’t find my partition” option and hit the Start button.

select the Mac location with deleted files

Step 2. Scan the selected location

Typically, the software will run an all-around scan and search for the lost and deleted files on the entire drive.

scan Mac location with deleted files

Step 3. Preview and recover deleted Mac files

When the scan completes, the files will be listed on the screen. The software will sort out the files according to format to make the search easier. You can select multiple files at a time and have a preview at them.

recover deleted Mac files

You also have the option of doing a deep scan of the files at the bottom.


Part 6. Tips Against "Can't Delete Files on Mac"

Some of the issues that you face with deleting files on your Mac and end up believing that they can’t be deleted is false. “Why so?” You ask.

First things, first, you needed to relax. Frustrations often lead to irrational behavior. When you feel like it’s becoming impossible and you have done everything don’t start throwing tantrums. Realize that some files can’t be deleted for a reason or you probably are yet to find out.

To find out what kind of files you should or shouldn’t get rid of, check on sites and articles such as this one. You can look at various methods of troubleshooting for an easy time.

As a Mac user, you must have heard of similar cases from friends. Ask yourself what they did differently and try to follow their footsteps.

When memory fails you, and you can’t remember what to do, call the right people. Reach out to online experts who can assist.

Finally, with all that you do, be cautious. While struggling to delete a file, you can quickly end up getting rid of something as important as a system file. Double-check on stubborn files when clearing your Hard drive.

Conclusion

Clearing your system is as vital as deleting files and emptying the Trash on your Mac, since with everyday use, your device accumulates unnecessary files. So, when a file error such as "file in use, cannot be deleted" pops up, be careful. Also, you should double-check the kind of files you install, especially third-party apps.

However, when you or anybody else is stuck on how to delete files that won’t be deleted, direct them to check out this article. I am sure you have significantly benefited from it so, help others too.

Sue Wayne

staff Editor

0 Comment(s)
Home > Resources > Solve Mac Problems > How to Delete Files that Cannot be Deleted on Mac