How to reset mac PRAM through the command line in Lion/Mountain Lion?

29,778

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.

Share:
29,778

Related videos on Youtube

Alex Plumb
Author by

Alex Plumb

I'm a Halifax, Nova Scotia-based developer and system administrator.

Updated on September 18, 2022

Comments

  • Alex Plumb
    Alex Plumb almost 2 years

    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?

  • slhck
    slhck over 11 years
    The user wants to write a script to automate this from a shell in a running system, not doing it by rebooting.