How to delete files from your Mac that won’t be deleted

How to delete files from your Mac that won't be deleted

Have you ever tried dragging a file to your Mac’s Trash, only to get an error message? The file may be in use, locked, or you do not have permission to edit the file in question. Here we cover all the ways you can delete files on your Mac that won’t get deleted and refuse to go into the trash.

1. An application is using this file

You cannot delete a file if an application is using it! If your Mac displays the “file in use” error, you need to determine which application has a hold on the file and close that application.

If you only have a handful of apps open, it can be as easy as going through the different app windows. You can also see a list of all active applications in the “Force Quit” window:

1. Click on the “Apple” logo in the menu bar of your Mac.

2. Select “Force Quit”.

You can now see all the apps running on your Mac.

If you spot an application that could be responsible for the “File in Use” error, you can close that application normally. You can also select the application in the “Force Quit” pop-up window and then click the “Force Quit” button. Note that if you opt for the latter, you will lose any unsaved work in the app.

Once you have closed the offending application, try to delete the file again. It should now disappear without any problem!

2. The file is locked

When a file is locked, you cannot make changes to that file. This includes its removal.

READ:   How to hide user accounts from the macOS login screen

You will need to unlock this file before deleting it:

1. Control-click the file to unlock.

2. Select “Get Info”.

3. Click to expand the “General” section.

4. Find the “Locked” checkbox and uncheck it.

You cannot delete a locked file.

You can also unlock a file using your Mac’s terminal.

1. Open Terminal (Applications -> Utilities -> Terminal). In the Terminal window, type the following command:

This file should now be unlocked and you can go ahead and delete the file as usual.

3. You are not allowed to edit the file

Sometimes you may press the “Delete” key only to encounter a “You are not allowed to edit this file” message.

Fortunately, you can give yourself permission:

1. Control-click on the file in question.

2. Select “Get Info”.

3. Click to expand the “Sharing and permissions” section. You will see a list of all user accounts registered on your Mac.

You can assign yourself "Read write" permissions for any file.You can assign yourself "Read write" permissions for any file.

4. To authorize yourself to modify this file, click on the small padlock icon.

5. When prompted, enter your username and password.

6. Find your username in the list, click on the arrow set that comes with it, and select “Read & Write”.

You can lock and unlock a file using macOS "Obtain informations" the window.You can lock and unlock a file using macOS "Obtain informations" the window.

You should now have permission to edit this file, including dragging it to the trash!

4. None of the above fixes work? Try to force deletion

If all else fails, you can force the file to be deleted using a Terminal command. Just be aware that force deletion does not send the file to the recycle bin – it permanently and immediately deletes the file in question. If you realize that you have made a terrible mistake, there is no way to get the file back.

READ:   WWDC 2020: the big changes on iOS and macOS

This technique can also delete files that you wouldn’t normally be able to delete – and sometimes Apple has a very good reason to protect certain files! Forced deletion is a useful technique but should be used with caution.

To force a file to be deleted, open the terminal of your Mac (Applications -> Utilities -> Terminal) and type the following command:

Taking out the trash

Did you manage to ban a file from the recycle bin, but now it’s stuck there, refusing to drop it?

If you get an error message every time you try to empty the Trash, there are a few things you can try.

1. Close all applications

An app might be using one of the files in your Mac’s Trash.

You can resolve this problem by selecting the “Apple” logo in your Mac’s menu bar, choosing “Force Quit …”, then closing the application in question.

If you don’t know which app is interfering with the “Empty Trash” command, you can always restart your Mac, which will close all apps.

When your Mac restarts, make sure to empty the Trash before launching any apps!

2. Make sure all files are unlocked

If the recycle bin contains a locked file, it may prevent you from emptying the recycle bin successfully.

If the Recycle Bin contains only a handful of files, you may be able to check each of those files manually by holding down the Control key on each file and then selecting “Get Info.” If you discover a locked file, you can unlock it by following the steps listed earlier in this article.

READ:   How to automate repetitive macOS tasks with Automator

3. Force deletion of stubborn files

If you suspect that a particular file may prevent you from emptying the Recycle Bin, you can forcefully delete that file while it is in the Recycle Bin:

1. Open the recycle bin on your Mac.

2. Ctrl + click on the file you think is causing the problem.

3. Select “Remove immediately”.

Rinse and repeat for any other files that you think might affect your ability to empty the Trash.

Now that you have successfully deleted a file that will not be deleted initially, it is a good idea to delete an AutoSave file version to free up storage space. You should also locate and delete duplicate files on your Mac.


Is this article useful?

s.parentNode.insertBefore(t,s)}(window, document,’script’,
fbq(‘init’, ‘400239050508508’);
fbq(‘track’, ‘PageView’);

deleteEmpty Trashforce deleteMactrash

More Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed