Home > Wiki Tips

Remove AppleSetupDone: rm /Volumes/Macintosh HD/var/db/.AppleSetupDone

Updated on Thursday, July 4, 2024

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: Looking to remove AppleSetupDone to relaunch the Mac Setup Assistant? This article explains what AppleSetupDone is and how to delete AppleSetupDone on different macOS versions.


One popular method to create a new admin account when you don't already have one is to rerun the Setup Assistant. It doesn't require you to erase and reinstall macOS. Instead, you only need to delete the file labeled AppleSetupDone.

However, you may fail to remove it due to errors like "read-only file system," or "No such file or directory." Sometimes, even if you successfully delete the AppleSetupDone file, it may not trigger the Mac Setup Assistant as expected.

In this article, I'll help you tackle those issues so that you can rerun the OS X/macOS Setup Assistant.

What is the AppleSetupDone file on Mac?

.AppleSetupDone is a hidden, empty file automatically generated after your Mac is set up and configured. Every time your Mac boots up, it will check if the AppleSetupDone file is present. If it is, it knows that the initial setup has been finished and it should boot to the desktop.

Nevertheless, if the AppleSetupDone file is removed, your Mac will launch Setup Assistant, allowing you to create a new administrator account and configure your Mac.

AppleSetupDone file location on Mac

This system file is located at the root level of your Mac's internal hard drive, usually at the path Macintosh HD/private/var/db/.AppleSetupDone. To access it, open Finder, click Go > Go to Folder, and search /private/var/db/.AppleSetupDone.

Is the information helpful? If it is, share it!


How to remove AppleSetupDone file to rerun Setup Assistant on Mac?

If you want to create an account with administrative privileges, you can remove AppleSetupDone on Mac. The process is simple as long as you follow the correct commands based on your macOS version. 

 Note: It's worth mentioning that deleting the AppleSetupDone file itself won't remove data on your Mac but simply allows you to access the setup wizard again.

How to delete AppleSetupDone in Terminal:

For OS X & Mac OS X:

  1. Shut down your Mac.
  2. Turn it on and then immediately press and hold Command + S to enter Single User Mode.
  3. Release the keys when you see the Terminal-like command line interface appearing on the screen.
  4. Input the command below and hit Enter to check the filesystem./sbin/fsck -fy
  5. Mount the root file system in read-write mode./sbin/mount -uw /
  6. Remove AppleSetupDone to rerun OS X Setup Asisstant.rm /var/db/.AppleSetupDoneHow to delete AppleSetupDone in Terminal
  7. Restart your Mac.reboot

For macOS Sierra/High Sierra/Mojave/Catalina/Big Sur/Monterey/Ventura:

  1. Boot into macOS Recovery Mode.
  2. Click Disk Utility > Continue.
  3. Ensure the data volume (Macintosh HD - Data) is mounted. If it's not, select it and click the Mount button. (You'll be required to enter your login password if it's FileVault-encrypted.)
  4. Quit Disk Utility.
  5. From the Utilities menu, select Terminal.
  6. Type one of the following commands and hit Enter. (If you've renamed your startup disk, replace Macintosh HD - Data or Macintosh HD with the altered name.)
    If you have a separate Data volume:rm -i "/Volumes/Macintosh HD - Data/private/var/db/.AppleSetupDone"If you don't have a separate Data volume:rm -i "/Volumes/Macintosh HD/var/db/.AppleSetupDone"The parameter -i in the command line prompts you for confirmation before removing the file. If you remove this option, the file will be deleted without your confirmation.
  7. Confirm that you want to delete .AppleSetupDone.
  8.  Restart your Mac.
  9. Follow the Setup Assistant to configure your Mac.

For macOS Sonoma and later:

If you're running macOS Sonoma or later, removing /private/var/db/.AppleSetupDone won't relaunch Setup Assistant if a local user already exists on the Mac. Instead, you must use Erase All Content and Settings to trigger the Mac Setup Assistant.

 Warning: The following steps will completely erase everything on your Mac and reset it to its original state. Back up your Mac before proceeding!

  1. Go to the Apple menu > System Settings > General > Transfer or Reset.
  2. Click "Erase All Content and Settings." 
    Erase All Contents and Settings
  3. Follow the instructions to reset your Mac.

Note that this feature is exclusive to T2-based and Apple Silicon (M1/M2/M3) Macs. If you're using a non-T2 Intel Mac, you can erase your Mac and reinstall macOS to initiate the setup process.

Can't delete AppleSetupDone on MacBook or desktop Mac

When deleting .AppleSetupDone, you may encounter one of the following errors:

  • rm: /var/db/ .AppleSetupDone: No such file or directory
  • rm: AppleSetupDone: Read-only file system
  • rm: /var/db/ .AppleSetupDone: Permission denied

These errors are often caused by incorrect use of the command line, such as specifying a wrong file location for AppleSetupDone or misusing spaces. To fix them, you should check:

  • If the file location of AppleSetupDone in your command line is correct for your macOS version;
  • If there's an extra or missing space in the command line;
  • Disable SIP and retry the command;

Share this article to help others remove AppleSetupDone on Mac!