I have a series of local accounts on a El Capitan (Need to stay on 10.11.6 due to app compatability). I want these accounts to get the "default profile" every time they log in. I mean * absolutely clean* - new desktop, downloads, settings and preferences.. I want it all gone.

I go about this by having a logout script that simply deletes the home folder, such as:

sudo rm -R /Users/myusername

This way the user and password is retained, but all rubbish that was left on the account is gone, and clean for the next login.

This works absolutely fine, except... the dock has three question marks on it when the user logs back in until the machine is rebooted. The question marks relate to three applications that are not installed on the Mac (Keynote, Pages, and Numbers). This problem happens from a clean download and install of OS X using the recovery utility.

Does anyone have any ideas why this might be happening? Or does anyone have another method of destroying the home folder that I can try?

  • 2
    Deep Freeze
    – Tetsujin
    Jan 6, 2017 at 18:19
  • Is the Guest account not sufficient?
    – Tuesday
    Jan 6, 2017 at 18:45
  • Can you, like @timothymh suggested, just use the Guest account built into OS X?
    – NoahL
    Jan 7, 2017 at 3:25
  • Guest account is not suitable for various reasons in the environment. Deep freeze can help, but pricey and unnecessary to just resolve an intermediate dock issue.
    – MrBeatnik
    Jan 8, 2017 at 7:22

1 Answer 1


The dock is being populated with default items by way of /System/Library/CoreServices/Dock.app/Contents/Resources/en.lproj/default.plist. This is protected via SIP though. So you can try the obvious (and non recommended) method of disabling SIP to mess with the plist. There are other options.

  1. Use dockutil in a login script to add/remove/etc. whatever icons you desire.
  2. Customize the dock as you want it to be, and copy ~/Library/Preferences/com.apple.dock.plist. Have a login script replace the default dock plist with the backup, then kill the dock and maybe cfprefsd.
  3. Management suites, such as Casper, can manage the dock remotely.

See https://www.jamf.com/jamf-nation/discussions/18357/el-capitan-user-template-dock-customisation-issue

  • Why does the default dock have these apps when they are not installed (from fresh recovery)? Also the ?'s only appear when the folder is deleted UNTIL a reboot. Then it's all fine again (no ?'s).
    – MrBeatnik
    Jan 8, 2017 at 7:20
  • That's just how Apple does it - at some point in the login process, OSX looks to that plist file as a template for all new docks and it doesnt get changed if you remove any of the pre-installed Apps. If you open it up and look, you'll see all the default OSX icons in there so you can still have a dock shortcut to a missing app.
    – Hefewe1zen
    Jan 8, 2017 at 17:13
  • Yeah I see the apps in there, even though the apps have never been installed and don't come with the OS. Strange that it doesn't cause the questions marks unless you delete the Home directory though, until you reboot. Strange behavior, I guess I should be used to it by now!
    – MrBeatnik
    Jan 9, 2017 at 10:56

You must log in to answer this question.

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