Delete own user from Mac OS

by Ali Gul   Last Updated December 11, 2017 14:12 PM

I was wondering if it is possible to delete my one and only user account because I am creating a script to add and remove users on my Mac.

I have this command here:

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

I'm a little bit worried to test that because I don't want to delete my only user with all my files so is it possible?

Tags : bash script

Related Questions

Conditional lsof loop in bash script

Updated August 05, 2015 16:05 PM

Identify a partition from script

Updated April 05, 2018 13:12 PM

Make a bash script unreadable / uneditable

Updated April 07, 2018 16:12 PM

Is it possible to create exs24 files with a script?

Updated November 28, 2018 00:12 AM