I can not find a clear step by step guide on how to completely remove all data, apps, cache from my Mac (to give it to another friend), but keep a certain folder that I can not backup otherwise (it is 40 GB and we are far from home).

I have a MacBook Pro running macOS Mojave. I have 1 folder on the Desktop, and I want to remove all the data from the Mac including all cache and apps, and leave this folder there.

We can and should keep the macOS Mojave as I just downloaded it.

I want to really remove everything since it has a lot of garbage, cache, and private keys, etc.

  • 3
    Wouldn't it be easier to just create a new user on the Mac?
    – nohillside
    Nov 28, 2018 at 8:09
  • 3
    I don't see why you can't get a 64GB flash (they're cheap), copy your files there, and then do a fresh install from Recovery. IMO, I would spend the $12-15 to back up the data and do a clean install in less time that it would take to actually research what needed to be removed.
    – Allan
    Nov 28, 2018 at 8:32
  • By everything do you also mean the OS and all installed applications? Or do you just mean the home directory of a specific user, minus one specific folder?
    – nohillside
    Nov 28, 2018 at 9:41

2 Answers 2


Apple Support has some excellent documents on guidelines to follow before selling/giving away your Mac.

As per this document, the best way to restore the Mac to factory settings and remove everything and reinstall macOS. This should really get rid of all user data and any user installed apps.

However, you do not wish to re-download and re-install macOS Mojave. This is what I would do if I were in your place and had similar requirement.

  1. Start by uninstalling all the unnecessary app installed from Mac App Store and other places.

  2. First of all, go to Launchpad, press and hold Option key and uninstall apps installed from the Mac App Store. The ones installed from the Mac App Store shows an x button towards the top left of the app icon. Simply click on the x button to uninstall it.

  3. Download and install an app called AppCleaner. Use AppCleaner to look for and uninstall any user installed apps.

  4. Restart the computer to make sure any recently uninstalled app is completely removed.

  5. Uninstall any package manager such as Homebrew, MacPorts that you may have installed by following the respective uninstall instructions from their website.

  6. You are now done uninstalling the apps. I am assuming you are an Admin user. Now proceed to delete any (all) other user account(s) that you may have on system. Select the delete the user Home folder to delete any files/data saved by them.

  7. Create a new Admin user account by going to System Preferences app → Users & Groups → (Unlocking preference by clicking on Lock icon) → Clicking on + button and creating a new Administrator account.

  8. Copy the folder that you wish to backup from the Desktop to a folder named Shared which is present in /Users directory alongside your current users Home directory.

  9. Make sure to also copy any files to Shared folder that you may wish to backup.

  10. Now go to System Preferences app → iCloud and turn off Find My Mac (if enabled). This will require your Apple ID credentials to be entered.

  11. Under iCloud system preference, click on the Sign Out button to disconnect from iCloud. Make sure to remove local copy of any data (Contacts, Reminders, Notes).

  12. Log out of the current user, we are done cleaning up.

  13. Log in with the newly created account and perform any preliminary configuration.

  14. First of all, copy the directory that you backed up from your Desktop to Shared folder to a suitable location in the new users account Home directory.

  15. Once successfully backed up, delete the directory and any other files from the Shared directory.

  16. Now go to System Preferences app → Users & Groups, unlock the preference by clicking on the lock icon, select and delete your original user account. To delete it, click on the account name and click on the - button shown towards the bottom. When prompted, choose to delete all the user data.

  17. This should take care of your specific requirement and should give you a usable factory condition like macOS installation. You can now give it away to your friend.

  • Thanks a lot. Can you add the option to your answer on how to keep the folder and reinstall the OS?
    – NgocP
    Nov 28, 2018 at 8:20
  • @NgocP If you wish to keep the folder and perform a fresh OS reinstall, it is recommended to backup the folder elsewhere (USB drive, external hard disk, cloud storage) and restore it after the reinstall.
    – Nimesh Neema
    Nov 28, 2018 at 8:22
  • Thanks, but again there seems to not be an answer to this question. how do you REMOVE EVERYTHING from this mac other then this folder ? EVERYTHING ? I have already logged out of everything and still most of the hard drive is occupied, and still they refuse to remove all my cache and iCloud from many apps. I would like to clean EVERYTHING in the hard drive and leave only 1 folder.
    – NgocP
    Nov 28, 2018 at 8:45
  • @NgocP To ensure everything is removed, the only recommendation would be to backup data on a USB drive and do a clean install of macOS.
    – Nimesh Neema
    Nov 28, 2018 at 9:08

Is this not one of the reasons APFS was create?

This the procedure given below probably has flaws, but basically contains the needed steps.

  1. Create a new APFS volume.
  2. Transfer the files you want saved to the volume.
  3. Delete your account.
  4. Create your account.
  5. Copy the files back to your Desktop.
  6. Remove the new APFS volume.

Maybe another alternative, if you have enough free space:

  1. Create a new APFS volume.
  2. Install macOS in the new volume.
  3. Copy your files to the new volume.
  4. Delete the old APFS volume.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .