Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
Mac OS 13.3.1

For some strange reason, I see next to the actual Mac user a "Deleted Users" folder beneath "Users". Dragging it to the trash seemed to work, but when I tried to empty the trash, it said there were files "needed by MacOS" and wouldn't delete them.

Now the Deleted Users folder is back in /Users.

The user that was "deleted" is the regular user name but with a "10" suffix.

The Deleted User is like "Joe 10". No user with this name ever existed.

So, how do I actually remove this "Deleted User"?

Hopefully someone has run into this issue.

Thanks in advance,
 
If I was determined to get rid of that folder, here's what I'd try.
(and yes, it's going to involve some work -- perhaps others here will offer easier solutions)

You're going to need an EXTERNAL DRIVE that is BOOTABLE.
If you don't have one, you're going to need to create one.

Once you have that, I would boot from the external drive.

Then, I'd let the internal drive mount on the desktop.

Next, I'd take steps to over-ride permissions on the internal drive:
a. Let the internal drive icon appear on the desktop
b. Click on it ONE TIME to select it.
c. Bring up the get info box for the internal drive (type command-i)
d. Click the lock icon at the bottom and enter administrative password
e. Put a check into "ignore ownership on this volume" (sharing & permissions)
f. Close get info.

Now, I'd navigate to the problem folder.
Then I'd try dragging it to the trash, and emptying the trash.

... and see if that worked any better.
No promises that it will work -- but again, it's "what I'd try"...
 
  • Like
Reactions: Mork
Thanks for that suggestion. My concern with this approach is that since I can't currently delete the "Deleted User" files I dragged to the trash, I don't want to "brick" the mac by booting separately, deleting the files (which I do believe would work), but then to find out that they're somehow needed to boot completely.

This is an odd problem.

Perhaps I should contact Apple?
 
OP wrote:
"I don't want to "brick" the mac by booting separately, deleting the files (which I do believe would work), but then to find out that they're somehow needed to boot completely."

OK, then here's an alternate "turn it around" approach:

Create the bootable cloned external drive as I suggested above.

The cloned backup will be an exact copy of the internal drive.

Then, boot from the cloned drive (just to be sure it IS bootable).

Now, boot BACK TO YOUR INTERNAL DRIVE.

Now, perform the "permissions trick" on the EXTERNAL drive (as suggested above).

And then... delete the deleted user folder on the EXTERNAL drive.

Finally, try booting from the external drive again.

Does it still boot?
Or not...?
 
  • Like
Reactions: Mork
Paste this into a Terminal window, then post the output:
Code:
ls -lae /Users/Deleted*
What this does:
The 'ls' command lists info about files and dirs.
The -l option lists most info about the items. Without it, ls only lists names.
The -a option lists names that start with ".". This is to show the info about "." and "..".
The -e option lists extended permissions, if any.
The Deleted* pattern matches any name in /Users that starts with "Deleted".

I suspect the "Deleted Users" folder will have a group:everyone deny delete extended permission (Access Control List (ACL) item).

I also suspect the same for Joe 10, or whatever the folder therein is named.

Furthermore, the group:everyone deny delete is generally present on system-supplied folders in every user account home dir. You can see this with:
Code:
ls -le ~

The one sure way I know to delete things with a group:everyone deny delete ACL item is with 'sudo rm'.

Another way is to remove the ACL item using the 'chmod' command. This will need to be done by the owner, or by root (sudo).
 
  • Like
Reactions: gilby101 and Mork
You're right. the ls -lae did indeed show the "group:everyone deny delete"

However, when trying sudo rm -rf "/Users/Deleted Users" it said "denied".

I guess we'll try the safe mode approach and hope the Mac still boots after removing this folder.

(I'm doing a full backup of this mac in case we brick it.)

Will report back.

Thanks
 
I suggest deleting just the specific user in "Deleted Users". If that works, then the problem of undesired space is solved, without removing the dir that the system may want to keep.

There's a "locked" flag that can be present on files or dirs. There are separate owner and root versions of this flag. The Finder > File > Get Info > Locked checkbox affects the owner version of this flag. If the root version of the flag is present, the checkbox is checked and dimmed.

Code:
ls -ldO "/Users/Deleted Users"

If an item is locked, you'll see 'uchg' or 'schg' between the group-name and size fields. If it's unlocked, you'll see a simple '-'.

man chflags
 
I suggest deleting just the specific user in "Deleted Users". If that works, then the problem of undesired space is solved, without removing the dir that the system may want to keep.

There's a "locked" flag that can be present on files or dirs. There are separate owner and root versions of this flag. The Finder > File > Get Info > Locked checkbox affects the owner version of this flag. If the root version of the flag is present, the checkbox is checked and dimmed.

Code:
ls -ldO "/Users/Deleted Users"

If an item is locked, you'll see 'uchg' or 'schg' between the group-name and size fields. If it's unlocked, you'll see a simple '-'.

man chflags
At this point, I can't delete what's in the trash, safe mode or not. I also cannot copy it out of the trash and back to /Users (or anywhere else). The machine (possibly or possibly not) is now shutting itself down every hour and we have to power back on. Could be a hardware issue, but this only started when I started trying to remove this infernal "Deleted Users" folder.

Perhaps a machine rebuild is in order.

This situation is very reminicent of "Windows". (Just re-install Windows!).

Thx.
 
What I would do in this situation:
- boot to Recovery
Use macOS Recovery on an Intel-based Mac https://support.apple.com/guide/mac-help/use-macos-recovery-on-an-intel-based-mac-mchl338cf9a8/mac
Use macOS Recovery on a Mac with Apple silicon https://support.apple.com/guide/mac-help/macos-recovery-a-mac-apple-silicon-mchl82829c17/

- open Terminal: In the Recovery app, choose Utilities > Terminal

- delete Deleted Users & trash for the main user (assumed in the example below to be Mork)

Code:
rm -r "/Volumes/Macintosh HD – Data/Users/Deleted Users"

Code:
rm -r "/Volumes/Macintosh HD – Data/Users/Mork/.Trash"

(sudo is not necessary in Recovery)

-reboot
 
  • Like
Reactions: Mork
What I would do in this situation:
- boot to Recovery
Use macOS Recovery on an Intel-based Mac https://support.apple.com/guide/mac-help/use-macos-recovery-on-an-intel-based-mac-mchl338cf9a8/mac
Use macOS Recovery on a Mac with Apple silicon https://support.apple.com/guide/mac-help/macos-recovery-a-mac-apple-silicon-mchl82829c17/

- open Terminal: In the Recovery app, choose Utilities > Terminal

- delete Deleted Users & trash for the main user (assumed in the example below to be Mork)

Code:
rm -r "/Volumes/Macintosh HD – Data/Users/Deleted Users"

Code:
rm -r "/Volumes/Macintosh HD – Data/Users/Mork/.Trash"

(sudo is not necessary in Recovery)

-reboot
Thanks for your continuing great ideas! :) I'll give this a try shortly and update this thread. Thanks again.
 
I booted to the Recovery Console, but there was no "Deleted Users" directory in the Users folder. I also searched:

find / -name "Deleted Users"

Found nothing.

Weird, right?
 
The folder “Deleted Users” is still visible in Finder? The rm command didn’t work?
Use ls /Volumes/ to identify the Data volume’s exact name.
 
There is a per-volume trash folder in addition to the per-user ~/.Trash. I don't know which one has the items of interest.

Code:
ls -leaO /Volumes/*/.Trash*/*

The * wildcard is used in /Volumes because we don't know the exact names of your disks.

Please post the output, so we can see the actual names, permissions, etc. of what's on the diisks.
 
After fighting this for over a week, I finally figured it out! At least for me.

I turned on File Vault. I let it finish. Then, I tried deleting the old user, and it worked. Just like normal!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.