Easily Prep Your Mac for Resale

by Matt

I’ve had a few people write in to ask me similar questions: How do I erase my user data without erasing my hard drive? Or: I want to sell my Mac on eBay, but I want to run Software Updates and install other applications before I send it out. Doing so can really increase your Mac’s resale value. What’s the best way to do that?

It seems to me that what most people are asking is: How do I “start over” without completely erasing my hard drive? This short hint shows you a few ways you can start over with a new user account if you don’t want to erase everything.

Creating a New User Account

If your only goal is to delete your user account and create a new one for yourself, this is easy to accomplish, so let’s start with that one (go down to the next section to see how to more completely prep your Mac for resale without erasing the hard drive):

  • First, open System Preferences and click on the Accounts preference. What we need to do is create a new user account with administrator privileges, so we need to make sure that the padlock in the lower left-hand corner is unlocked. If it’s locked, click it and your computer will ask you enter your administrator password.
  • Once this is complete, you can click the plus button directly above the padlock. A window will open, allowing you to create your new account. Here’s what it will look like:
    Add New Account
  • As you can see above, we need to do five things in this window. First, you want to make the new account an Administrator account so that the new account has access to all the computer’s functions.
  • Next, put in the user’s name for the new account (which should automatically fill in the short name, but you can change it here if you want).
  • Finally, enter a password (and again under Verify), then click “Create Account.”

After you have created the account, you can quit System Preferences and log out of your account (Apple menu –> Log Out). When you arrive at the Mac’s login screen, you should log into the new account you created. Once in the new account:

  • Open System Preferences again, and go the Accounts preference.
  • You’ll want to again make sure the padlock in the lower left corner is unlocked. Then, click on the old account you want to get rid of, and click the minus button above the padlock. You’ll get this window to appear:
    Delete the User Account
  • Here, you can make a choice with what you want to do with data from the account you’re erasing. If you want to completely get rid of the data (make sure you’re ready to do this!), click Delete the home folder. If you want to leave the user folder intact in the Users folder (this is rare but useful if you still need to access the data), click Do not change the home folder. The data will still be there, but you can no longer log in as that user. Finally, you can click Save the home folder in a disk image if you want the computer to delete user account (so that it is absent from the Users folder and you can no longer log into that account). This option will copy all of the data and put it into a disk image on your Desktop so that you can access the data if you still need to.
  • Once you’ve deleted the old account, your new account becomes the default account (if it is the only other account on the computer), and when you restart, it should log you into your new Desktop.

Make Your Computer Start Up with the New Computer Setup Program

Remember when you first got your Mac? When you first turned it on, it booted into a flashy video sequence before it had you begin configuring your users and settings. You may know that if you restore your computer from the original DVDs that you can achieve the results, but what if you don’t want to erase the hard drive? You can achieve the same thing, but you’ll have to be OK with running some terminal commands.

This is definitely a more advanced tip, can be difficult to learn at first, and you can screw things up. Please make sure it’s what you want to do.

  • First, you need to reboot your machine in single-user mode. This mode will start the computer up in a text-only terminal (kind of like a Unix version of DOS). You won’t get any windows or graphicsTo start up in single-user mode, turn your computer on while holding down the Command and “S” keys until your screen begins to show text (rather than the spinning Apple logo).
  • Eventually, the text will stop loading, and you’ll be left at a prompt with the pound key: #. Once you’re there, I’m going to have you type a few things. Make sure you type it exactly as I have written it (hit the Return key at the end of each line):
mount -uw /

What we did here was tell the computer to make your hard drive readable and writable. I’m now going to have you type the command that will erase all of your users’ data. If you don’t want to do this for some reason, don’t type the next line and continue to the next paragraph. I assume you want to erase your personal data, however, since you want the computer to start up as though it’s brand new.

rm -rf /Users/*

The above command says to remove absolutely everything in the Users folder (make sure you type shift-8 to make the asterisk symbol at the end of the line).

Now, type this:

cd /var/db/
rm .AppleSetupDone
rm .TimeMachine.Cookie
rm .TimeMachine.Results.plist
rm .com.apple.iokit.graphics
rm -rf dhcpclient
rm -rf samba

Whew! We had a bunch of commands there. Basically, these are settings and preference files for some programs on the Mac, and we want those to be reset when the computer turns back on. The most important file to remove is the .AppleSetupDone file (and yes, it does start with a period). When this file is present, the computer boots up normally. When it is absent, the computer thinks you’re turning it on for the first time and boots up to the flashy set up program.

We’re done, so you’ve got two choices: if you want to shut the computer down, type:

shutdown -h now

If you want to reboot the computer (to check out your handy work), type:

reboot

That’s it! With the above steps, you can install whatever software you like, then make your computer act like it’s brand new.

How did this tutorial work for you? Was it too complicated? Do you have an easier way of accomplishing the same task? Ask questions and give feedback in the comments.

Related Posts

Previous post:

Next post:

{ 19 comments… read them below or add one }

1 Tom Humes February 8, 2009 at 2:03 pm

Nice Site layout for your blog. I am looking forward to reading more from you.

Tom Humes

2 Kris March 11, 2009 at 6:36 pm

Uhh, the easiest and absolute best method is to wipe the drive, and reinstall the OS. Just deleting files still leaves all of your personal data at risk from whoever you may be selling it to.

3 Gregory March 18, 2009 at 10:43 pm

Just got a new MacBook Pro 17″, and my brother-in-law was in need of a laptop. So my 13″ MacBook I wanted to give to him, but I didn’t want to “Clear” it all the way buy reinstalling OS X. Since it has Windows installed and Microsoft office, I wanted the MacBook to still retain these things. This blog was perfect for what i was trying to do.
Thanks.

4 Ellen March 31, 2009 at 1:31 pm

If I go all the way through these instructions (to the brand new computer phase) will all of my programs still be there? I don’t have all the discs anymore, but I’d love to keep them. And I want to keep things safe.
Thanks for the walkthrough!

5 um.... May 4, 2009 at 1:21 pm

this method is a sure fire way to give all your personal info to whoever you sell it to. Deleting your home folder does not actually erase it. It just erases the pointers to the files. There are enough free programs out there to recover “deleted” information from old hard drives that even a 13 year old kid would have no problem getting all your data.

6 rynokins October 13, 2009 at 8:11 pm

perfect!

My recipe for a fresh computer:
A wipe of the drive, clean install of the system, then starting it up so I could run “erase free space” with “write ZEROS over data” – then running all software updates – then this.

Thanks!!

7 EkDor April 5, 2010 at 9:02 pm

It seems to me that not erasing the HD with some secure erasure is bad advice. You don’t know who your selling the device to. It is possible to reclaim some data, you don’t know what data that would be.

Do a full wipe and make use of the secure erase feature while your at it!

Another advantage of starting fresh is, by reinstalling, you are resetting the main library which IS NOT related to the user, which means deleting/creating new user will not effect it. If you’ve used this machine a while and used various apps there will likely be debris littering that and other directories/folders.

Not to mention any software you paid-for and registered. Which, if registered to the machine and not the user, will likely still be available to the next user you sell it to, if you or they happen to install the software. Again if they are disreputable they might even offer your serial up to pirate serial registrations for others to use, such as serial-box. If that serial is registered in your name then those people will be registering pirated software in your name.

Additionally this gives the computer a fresh start clearing out any little niggly errors that might have cropped up after extensive use.

Cheers,.

8 Chris March 6, 2011 at 8:09 am

Just wanted to say thanks for this tutorial. I wanted to give my buyer that “like new” experience and this did the trick.

9 Jenny May 3, 2011 at 5:57 pm

Hi there,

So to confirm, any software bought by and registered to me cannot be sold with the computer?

Thanks!

10 EkDor May 4, 2011 at 1:27 am

To clarify. Sure you can sell your software or software registration, unless otherwise specified by the developer you bought it from. But once you do sell it you don’t own it and therefore can’t use it on your new computer. Some developers will detect multiple uses of a serial and deactivate it. So if this happens you may effectively rip off your customer. Additionally if your registration data contains your name you may have a problem. Also be aware that you may have provided other personal details with your registration. It’s all a bit messy if you ask me. I wouldn’t recommend it.

11 Sweetwater May 18, 2011 at 4:32 pm

Thanks for posting this, it was exactly what I was looking for!

12 david August 11, 2012 at 4:48 pm

This works great. Is there anyway to keep the icons on the desktop? It keeps all the programs in applications but wipes the desktop. Any help would be appreciated.

13 EkDor August 11, 2012 at 8:13 pm

David,
The desktop files are stored in the users directory in “Desktop”. Copy this prior to altering the user. Copy it back when done. Please note that you may encounter some privileges issue. That depends a bit on what files you have in that directory. Also note that Disk Utilities “Repair Permissions” only fixes privileges unrelated to the users file, such as the system, global apps, and global library. You can reset the users permissions using a utility called “Reset Password” provided with your Lion/Mountain Lion restore partition. The process is more in-depth than I care to type right now. You should find info about that by googling something like; “mac password reset user privileges” (password in your query helps since the function you want is part of that utility.

The apps etc. are not generally stored in the users Library but at the bottom of the HDD hierarchy.

14 david August 12, 2012 at 2:07 pm

Thanks for the quick reply. All the applications I pre-installed are in the applications folder so everything worked great. I just wanted them left on the desktop so the user will see the ones I pre-installed on the desktop rather than hunting for them.

15 EkDor August 12, 2012 at 10:37 pm

Your welcome David.

16 Justin September 24, 2012 at 9:02 am

This process doesn’t delete all of the User Accounts before sale. When I went through the initial setup as if I were the buyer, there was still the leftover “admin” account I had created in the Accounts panel.

17 MacforCash April 4, 2013 at 10:58 am

This method seems to be working really great with my clients that ship in macs. But heard that its not really a safe and damaging to the hard drive. Can anyone collaborate on that?

18 cheap fishing boat online June 21, 2013 at 3:14 pm

I’m pretty pleased to uncover this site. I want to to thank you for your time just for this fantastic read!! I definitely appreciated every little bit of it and I have you book-marked to check out new information on your blog.

19 buy cheap luxury watches July 13, 2013 at 4:15 am

Hi, I do believe this is an excellent site. I stumbledupon it ;) I’m going to revisit once again since I bookmarked it. Money and freedom is the greatest way to change, may you be rich and continue to help others.

Leave a Comment

*

{ 9 trackbacks }