I'm trying to write a script to automate a PRAM reset and I've seen a lot of old guides that tell me to use the following command to reset the Mac's PRAM via the terminal:

nvram boot-args="-p -r"

But this command doesn't seem to work anymore, at least not on any of the computers I've tried it on. I'm trying to find a more up-to-date list of available boot-args and I was able to find this question about boot-args strings but there doesn't seem to be anything in there or any of the links about resetting the pram.

Any ideas?


Mountain Lion does not have this functionality, but Mavericks does!

Resetting the PRAM is now as simple as running the following command as root:

nvram -c

According to the man page for the nvram command (in Mavericks):

-c     Delete all of the firmware variables.

I should note that this also works all the way up to and including Sierra.

  1. You have to be logged-in as an administrator.
  2. You must use "sudo" before the "nvram" command if you do this in the terminal.

I found the Apple article for Mountain Lion, the process seems to be quite simple. Link here: KB PH11243

  1. Shut down the Mac.
  2. Find the Command, Option, P & R keys.
  3. Turn on the power, then hold these keys down. Ensure that the keys are held down until the second boot sound plays.
  4. Release the keys.
  • 1
    The user wants to write a script to automate this from a shell in a running system, not doing it by rebooting.
    – slhck
    Jan 21 '13 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.