How do I undo a terminal command?

I had found a way to turn off the charging sound on my macbook as it would repeatively play it by inputing a terminal command posted by another user. It seems to have done something to my charging brick as it is blinking orange and only while using this brick. Please help as this os my only brick and I really don't want to buy another one. Thanks

MacBook Pro 14″, macOS 15.0

Posted on Sep 17, 2024 6:38 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 18, 2024 7:05 PM

In general, there is no "undo" for Terminal commands. In the case of commands that set preferences, it might be possible to issue new commands that have an equal and opposite effect, but this is not guaranteed. E.g.,


MakeUseOf – How to Change or Disable Your MacBook's Charging Sound


I have no idea what you actually typed. The fact that your power brick is showing a blinking orange light is not a good sign. It seems to mean that that your Mac is not charging as it should.


The Mac Observer - Fix: MacBook Is Not Charging But Shows Orange Light


Note that this second article contains a technical inaccuracy, when it refers to a procedure for "resetting the SMC" on Apple Silicon Macs. Apple Silicon Macs don't have SMCs. The suggested procedure may do something similar, but MacWorld said they had no way of determining if it actually does anything .

3 replies
Question marked as Top-ranking reply

Sep 18, 2024 7:05 PM in response to weirdpersonator

In general, there is no "undo" for Terminal commands. In the case of commands that set preferences, it might be possible to issue new commands that have an equal and opposite effect, but this is not guaranteed. E.g.,


MakeUseOf – How to Change or Disable Your MacBook's Charging Sound


I have no idea what you actually typed. The fact that your power brick is showing a blinking orange light is not a good sign. It seems to mean that that your Mac is not charging as it should.


The Mac Observer - Fix: MacBook Is Not Charging But Shows Orange Light


Note that this second article contains a technical inaccuracy, when it refers to a procedure for "resetting the SMC" on Apple Silicon Macs. Apple Silicon Macs don't have SMCs. The suggested procedure may do something similar, but MacWorld said they had no way of determining if it actually does anything .

Sep 20, 2024 8:40 PM in response to weirdpersonator

weirdpersonator wrote:

I had found a way to turn off the charging sound on my macbook as it would repeatively play it

If your laptop is continually beeping due to the Power adapter connection, then it means you have some sort of hardware issue that needs to be addressed & repaired. It could be a loose or even bad charging cable, bad power adapter, or a hardware issue with the laptop itself. Don't block the sound, get the underlying issue resolved as it will only get worse & leave you without a working laptop at a most inconvenient moment.


by inputing a terminal command posted by another user.

Never blindly use any Terminal commands you find online without actually knowing exactly what the command really does. There are no safety nets when using the command line. With some commands it may be easy to reverse the process. But with many commands such as the one in the article linked by @Servant of Cats, the command actually modifies a system preference file....sometimes you won't know where the actual preference file is located in order to restore it from a backup. In fact that linked article appears to have a mistake with one of those commands. Usually when using a terminal command you want to read the current value prior to changing it so you can go back to what existed previously.


It seems to have done something to my charging brick as it is blinking orange and only while using this brick. Please help as this os my only brick and I really don't want to buy another one. Thanks

Here is an Apple article which has a section which mentions a blinking amber LED on the MagSafe connector:

If your MagSafe cable or power adapter isn't working - Apple Support


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I undo a terminal command?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.