How to View & Clear the Mac NVRAM Contents from Terminal in Mac OS X
Advanced Mac users may find it necessary to view or directly manipulate firmware variables found within NVRAM on the computer. Typically the NVRAM contains specific system data about things like the system audio level, startup disk details, an active user name, screen backlighting and resolution, and other technical details. While most users have no business interacting with NVRAM, there are times when manually viewing and clearing out NVRAM variables can be beneficial for troubleshooting purposes.
With the help of a command line tool in Mac OS X, Mac users can directly read and adjust firmware in Mac OS without having to reboot the Mac and performing a general NVRAM reset.
This probably goes without saying, but aside from listing the nvram contents, users should absolutely not delete or clear nvram variables if they don’t know exactly what they’re doing and why.
To get started, launch the Terminal, found in /Applications/Utilities/ and issue the following commands, depending on your desired objective:
How to View All NVRAM Contents on Current Mac
Issue the following command to print out all current NVRAM contents:
This will display the output in XML format, which is much more readable than the default format, which is read with the -p flag:
If you don’t specify -x flag, you’ll likely see a lot of gibberish, XML, and perhaps some plain text mixed in that is easily readable, but for the most part this data is only going to be relevant to advanced Mac users for troubleshooting purposes.
An example of nvram -p output may look like the following:
$ nvram -p
Again, this will be meaningless data to most users but advanced Mac users can find helpful details in the NVRAM if they know what to look for.
How to Clear All NVRAM from the Command Line in Mac OS X
The next most useful trick is to be able to clear out NVRAM with the same command string. To delete all nvram variables just use the following syntax:
For changes to take effect, you must reboot the Mac, thus unless you’re doing something else you may want to just initiate a reboot from the command line while you’re there.
Deleting Specific NVRAM Variables on Mac OS X
To be more specific, you can also target a set nvram variable for removal with the -d flag:
nvram -d (variable key name goes here)
For example, to clear the system audio setting from nvram:
nvram -d SystemAudioVolume
Going Further with nvram Modifications
The nvram command has other uses as well for advanced users, from settings like disabling the startup boot chime sound on a Mac to always booting into verbose mode in Mac OS X or even enabling safe boot mode from the terminal for remote management or a headless/keyboardless Mac. For those interested in learning more about this powerful command, the man page for nvram is quite helpful, as is the basic –help flag to show other syntax options:
% nvram --help
nvram: (usage: no such option as --)
nvram [-x] [-p] [-f filename] [-d name] [-c] name[=value] ...
-x use XML format for printing or reading variables
(must appear before -p or -f)
-p print all firmware variables
-f set firmware variables from a text file
-d delete the named variable
-c delete all variables
name=value set named variable
name print variable
Note that arguments and options are executed in order.
Whether or not you find this necessary or easy really depends on your skill level and your needs. Many advanced Mac users know they can also reset the PRAM / NVRAM on boot with a key sequence, which can be helpful in troubleshooting some particular issues as well, and that approach removes everything from NVRAM similar to the -c flag during an actual reboot, which is perhaps easier for many users to remember. This is particularly valuable for working with remote machines connected through SSH or found elsewhere on the network, where it would be impossible to manually reset NVRAM with a keyboard shortcut sequence.
Another common example where clearing nvram can be beneficial for troubleshooting purposes is when the Mac App Store loads a blank display that won’t populate with any content or store data. For whatever reason, the nvram -c flag and rebooting almost always resolves that issue alone.
I had some RAM speed problems with my Mac Pro and I could never get it to reset the NVRAM, PRAM and the SMC. So, I booted into recovery first by pressing Cmd+R before system started and within Recovery Mode I did a restart again from the Apple logo. After rebooting and holding the Cmd+Alt+P+R combo keys until I heard the second chime knowing the reset was complete.
Hope this helps.
hello, I have a big problem.
I wrote in terminal “nvram -c” because I wanted to fix the fan velocity of my mac mini 3.1 (early 2009). Now the problem is the light in front of the mac mini does´t work and also the fan works from the beginning. Before I wrote in terminal I could configure the fan speed with fan control app, but now this program can’t detect that exists a fan.
What can I do? is it possible to reverse the situation? if I change the battery inside the mac mini is possible to fix it?
How to stop (in Yosemite) prawlers or snoopers,
I know somebody(s) knows every singel thing I type out
on my Mac …. even what (occasional) movies I watch…
Pitty, that I don’t know the first thing on how to rsolve that with a terminal code… could you help me with that please?
And second: A good link to start learning and understanding, to eventually writing in the Terminal lingo…Pdf’s or whatever is the fastest for a dummy like me to understand&learn it…
How do I know that there are peoples watching (maybe) and
monitoring me on mt MAcBook Air activities?
They told me as a joke, but after a few times, a coincidence
was out of the question!..
asap, please ,…lol!
Where do you see yourself in the evolutionary scale?