Sometimes you just need to “start from the the clean slate”. Or pass your old trusted Macbook to your little brother, or even sell it. But you are really not in the mood for reinstalling the OS and don’t even remember where are these OSX DVDs that came with the Macbook about couple of lifetimes ago.
There is a way to reset OSX back to “Welcome” screen wiping out your user account and everything that was in it (not sure about installed application – I think only your personal preferences will go).
The majority information is taken from here – I just summarized it so somebody else or I can find it again when needed.
1. Boot into single mode by holding down Command-S at startup.
2. In the following commands USERNAME means current Macos user, if there are more then 1 user configured on the system then you will have to repeat the procedure for each of them.
1 2 3 4 5 |
$ mount -uw / $ rm -R /Users/USERNAME $ /bin/launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist & $ dscl . -delete /Users/USERNAME $ dscl . -delete /Groups/admin GroupMembership USERNAME |
3. There are some opinions on if you need to delete anything in [cci]/Library/Preferences[/cci] – there are mostly application preferences so it’s up to you. Same goes for [cci]/var/log[/cci] – this is system predefined directory where the logs are stored so to stay safe and not to break the os I would recommend to review and zero files that you think are relevant by doing
1 |
$ echo "" > /var/log/somelogfile |
where somelogfile is the existing file you want to clear.
4. After you are all done there is finishing touch.
1 2 |
$ rm /var/db/.AppleSetupDone $ shutdown -h now |
Your Mac will turn off and on next boot it will start from animated “Welcome”. Enjoy.
This trick and other low level stuff should be well explained in [amazon_link id=”0273721585″ target=”_blank” ]Apple Mac OSX Leopard in Depth[/amazon_link] book.
0 Comments.