macOS Remove Admin Account with Terminal

October 17, 2018 | 08:48 PM


Sometimes you might need to remove an admin account on a mac with terminal, don't worry as I have found a solution that might work!

To search for a user, use this command:

/usr/bin/dscl . -search /Users name username

If you just need to turn an admin account to a normal user, use this command:

sudo dseditgroup -o edit -d UserName -t user admin

You can then use this command to delete the user:

sudo /usr/bin/dscl . -delete "/Users/username"