If you’re thinking about getting rid of or selling your older (OS X) computer but you can’t seem to find those restore disks that came with the computer, have no fear! You can still delete your user account so the recipient of your old computer won’t have access to your old files.

Please note that I’ve only tested this under OS X 10.3 and 10.4 machines. I know it doesn’t work on OS9 so don’t bother! I recommend that you be some-what familiar with the command line and know how OS X works to make the most of this tutorial.

Of course you should back up any information that you want and be aware that we’ll be using the command line interface to get this task done. After you’ve backed up all your files, restart your computer. Hold down Apple+S. This starts the computer up in single user mode. It’s quite archaic looking, no pretty windows, just a terminal that you have to type commands into. So let’s start with this command:

mount -uw /

This will mount the hard drive in a mode that allows us to write and modify it. This is good because we’re wanting to remove your user account from it.

Next type in:

cd /var/db/

This will move us into the /var/db/ directory. When you’re normally in OS X you would never see this directory because it’s hidden, mostly to protect you from deleting important files!

So now that we’re in /var/db/ let’s type:

ls -la

This will list the contents of that directory. You should see a file in there called .AppleSetupDone. We want to remove that file and the command to do that is:

rm .AppleSetupDone

Make sure you type that as .AppleSetupDone and not .applesetupdone or any variant thereof because that’s quite different and it won’t work! That command will remove that file from the system. The .AppleSetupDone file is created when you initially setup the system. If that file ISN’T there that intro movie and initial setup of the computer will be shown upon startup of the computer.

Next type in:

rm -R netinfo/

This command is a lot like the previous in that it deletes. The -R means it’s going to recursively delete which is what we need since netinfo/ is a directory. Had it just been a normal file (MP3, Word document) we could have dropped the -R part. The netinfo/ directory contains your account information and other information about system accounts on your computer.

Next we’re going to get rid of all your user accounts files. It’s important that you understand that once you run this command, all data under your user account is gone so be careful!

Type in:

cd /Users/

This will put you in the Users folder where all the user account data is kept, these are your documents, movies, music, etc…


ls -la

This again lists the contents of the folder. Hopefully you see your username in there. If so, type:

rm -R “your username”

example: rm -R jimmy/

This will delete the entire user account, files, folders, everything you kept in your home folder.

So now to test and make sure everything worked, type in:

shutdown -r now

This command will reboot your computer. If all worked well you’ll get that movie you first saw when you turned on your computer and you’ll get prompted to create new user accounts, set the date and time, etc…

You should note also this process will only remove your user account and data stored in your home folder. If you’re a messy person and keep files in the root of your hard drive or other places then you’ll have to go delete those too. This process also doesn’t remove applications you’ve installed such as Photoshop, games, Microsoft Office. You can remove those sorts of applications either using the command line or by logging into OS X normally and deleting them (drag to trash and empty).


You may also like

Leave A Comment

Please enter your name. Please enter an valid email address. Please enter message.