I accidentally used the following commands in terminal:

  1. In recovery mode: nvram boots-args="x"

  2. In a user profile in terminal: (a) sudo nvram boots-agr="" and (b) sudo nvram boots-args="", and then typed in the sudo password.

Will this affect the system at all, since these are misspelled commands? Usually the command is: nvram boot-args="", which has no "s" in boot, and "agr" is not used, but instead "args" is used.

Also, will it matter that a wrong command was used using the "sudo" command first?


The superfluous variable should in theory not have any adverse effects, unless the startup code has some very specific bugs/flaws (which I do not assume). But these extra definitions will continue to take up space in an area with somewhat limited capacity, and affect clarity.

You can use nvram -p to dump and inspect all variables.

With a nvram -d boots-agr you can get rid of the ill-named one, here: boots.agr. This will most probably require sudo.

As always, man nvram is your friend. And when using sudo, be very very alert; you can do things which cannot be easily revoked - an accidental -c to nvram for example would have a very nasty effect. As a consequence, you should double-check all parameters given here.

| improve this answer | |
  • Thanks @jvb. How would I specifically delete the Audi boots-arg in terminal on a MacBook Pro? Is it the same...sudo nvram -d boots-arg? Do I leave out the “x” and “”? Also, man nvram does exactly what? I want to essentially undo anything I inadvertently did. I was trying to boot up in safe mode but accidentally typed in the various typos sudo nvram boots-agr=“” in the user profile and nvram boots-arg=“-x” in recovery mode. – Bobi Mar 1 '19 at 5:58
  • man nvram will display the man(ual) page for the nvram tool, and explain the arguments and their usage. There you will find an example for setting and removing a variable... in case of -d, you just give the name (not name="value"). I really can recommend using man, it works for most commands you find on a system. – jvb Mar 1 '19 at 6:45
  • thanks. Will it inform me if I have to use sudo with nvram-d, or should I just use it anyway? Or is this best done from recovery mode? – Bobi Mar 1 '19 at 13:52
  • Use sudo sparingly - its main function is to act as a safeguard. When a command fails due to "insufficient permissions", check if you really mean to do that. Make sure you understand exactly what you are attempting to do. Double-check each parameter, then use sudo. Same goes for recovery mode, but even more decidedly. - I'm now feeling somewhat queasy talking about sudo and nvram while you did not know about man... feels a bit like a phone support hotline for chainsaw juggling... remember you are at the end with the chainsaws. You are accountable to make informed decisions. – jvb Mar 1 '19 at 14:32
  • Thank you @jbv :) When I did a nvram -p I did not see the boots-agr or boots-arg variables. Should I still remove them with the nvram -d command? I'm assuming that the MacBook Pro OS prevented me from creating any nvram variables as a default saving feature...or the nvram -p doesn't show the created variables? – Bobi Mar 1 '19 at 16:36

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.