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'.