0

If I wanted to get rid of everyone on my computer and I just typed in the following into the terminal:

sudo rm -rPf --no-preserve-root

would that work or is something wrong with my syntax? I added --no-preserve-root because I want it to get everything and I read that rm -r doesn't work by itself if no directory is specified

DavidPostill
  • 162,382

1 Answers1

0

sudo rm -rf will get rid of any file or folder that you feed to it (unless it is a file protected by the system-integrity system of OSX). -P will overwrite the empty space, but I would not advise using it if you have an SSD as it will only reduce the lifespan of it.

As to your question: do you want to get rid of all accounts? Or Simply everything? Because all I can tell you is that as far as I am aware your proposal or a equivalent like sudo rm -rfP / will certainly ruin your entire system.

I'd say, go for a clean install via OS Recovery if you want to start over with a fresh install. If you only want to delete the accounts, use the appropriate settings in 'System Preferences'.

Montmons
  • 103