How to delete 'locked' folders from Trash?

I had temporary account on my laptop called Lora, and I recently removed the user, but I found folder called "lora" in the users folder, moved it to the trash and I'm just not able to delete it. I posted screenshots with the popups I get. I also googled how to safely empty the trash, but nothing seem to be working.



Here is a link to the popups: https://imgur.com/a/3wIhjwI


Can anybody help with this?


And thanks a lot guys!


[edit] I accidentally chose MacOS High Sierra instead of Mojave. I'm Using MacOS Mojave.

Posted on Dec 23, 2018 12:40 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 24, 2018 2:47 AM

In order to delete a locked file, the process is pretty simple. If you want to delete one locked file, simply move it to the trash folder, and when you click "Empty Trash..." or press "Shift + Command (Apple) + delete," make sure you hold down the Option key. For multiple locked files, hold down Shift and Option while you empty the trash folder of your Mac computer.


Changing or moving locked files can be a burden, though. You can click on the file, choose "Get Info..." or press "Command + I," then uncheck the 'Locked' checkbox, but what if you have a bunch of files to unlock? Luckily, there are a few shortcuts that you can use to unlock these files:


1.The quickest method is to select all the files you want to unlock, then press "Option + Command + I" (or hold down Option while choosing "Get Info..." from the File menu) to open one Info pane for all of them. Then uncheck the 'Locked' checkbox, and you're done!

2.Another method, a little more involved, but possibly better for certain situations (like files spread through a variety of folders), is to open up the Terminal (in Applications > Utilities) and enter:

chflags -R nouchg <directory_name> (where the <directory_name> is the path to the parent folder.

3.A third method is to download a utility like LockMeBaby (from Soramimi Works) which performs the above steps for you.


After following the above steps, you will be able to delete your locked folder on Mac.


9 replies
Question marked as Top-ranking reply

Dec 24, 2018 2:47 AM in response to danskky

In order to delete a locked file, the process is pretty simple. If you want to delete one locked file, simply move it to the trash folder, and when you click "Empty Trash..." or press "Shift + Command (Apple) + delete," make sure you hold down the Option key. For multiple locked files, hold down Shift and Option while you empty the trash folder of your Mac computer.


Changing or moving locked files can be a burden, though. You can click on the file, choose "Get Info..." or press "Command + I," then uncheck the 'Locked' checkbox, but what if you have a bunch of files to unlock? Luckily, there are a few shortcuts that you can use to unlock these files:


1.The quickest method is to select all the files you want to unlock, then press "Option + Command + I" (or hold down Option while choosing "Get Info..." from the File menu) to open one Info pane for all of them. Then uncheck the 'Locked' checkbox, and you're done!

2.Another method, a little more involved, but possibly better for certain situations (like files spread through a variety of folders), is to open up the Terminal (in Applications > Utilities) and enter:

chflags -R nouchg <directory_name> (where the <directory_name> is the path to the parent folder.

3.A third method is to download a utility like LockMeBaby (from Soramimi Works) which performs the above steps for you.


After following the above steps, you will be able to delete your locked folder on Mac.


Dec 24, 2018 3:13 AM in response to herschel50

Thanks for the reply herschel50!

Ok, the first method ("Shift + Command (Apple) + delete," make sure you hold down the Option key. ) - not working, tried again, and nothing.


Second - ("Option + Command + I" (or hold down Option while choosing "Get Info..." from the File menu) to open one Info pane for all of them. Then uncheck the 'Locked' checkbox, and you're done!). The 'Locked' checkbox is grayed out, can't be unchecked.


Next method - (chflags -R nouchg <directory_name> (where the <directory_name> is the path to the parent folder.) Here's the output:

d:~ dm$ chflags -R nouchg /Users/dm/.Trash/lora/Library 
chflags: /Users/dm/.Trash/lora/Library: Permission denied
d:~ dm$ sudo chflags -R nouchg /Users/dm/.Trash/lora/Library 
Enter PIN for 'Certificate For PIV Authentication (Yubico PIV Authentication)': 
chflags: /Users/dm/.Trash/lora/Library/Containers/com.apple.mail/Data/DataVaults: Operation not permitted

Without the Yubikey inserted:

d:~ dm$ sudo chflags -R nouchg /Users/dm/.Trash/lora/Library 
Password:
chflags: /Users/dm/.Trash/lora/Library/Containers/com.apple.mail/Data/DataVaults: Operation not permitted


Also, holding down the Option key while choosing 'Get Info', changes 'Get Info' to 'Show Inspector'.


So far tried the methods above + everything Google has to offer.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to delete 'locked' folders from Trash?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.