How to Remove a Virus or Malware from Your Mac

Mac computer screen showing antivirus protection against malware

Contrary to popular belief, Macs are not immune to malware. If your computer becomes slow, overheats, or if applications close unexpectedly, it may be infected. Here are the steps to effectively remove malicious software from your Mac.

Disconnect the Mac from the Internet

The first step is to cut off all Internet connections. This prevents the malware from communicating with remote servers or spreading to other devices on the network. If you need to download a removal tool, do it quickly, then disconnect immediately or, even better, do it (if possible) from another computer.

Start in Safe Mode

Safe Mode limits the loading of third-party software at startup, making it easier to detect and remove malware. The procedure varies depending on the processor type:

  • Mac with Apple chip (M1, M2, etc.): Turn off the Mac, then hold the power button until the startup options appear. Select your startup disk, hold the Shift key, and click “Continue in Safe Mode.”
  • Mac with Intel processor: Restart the Mac and hold the Shift key until the login window appears. Log in; you should see “Safe Boot” in the menu bar.

Scan the System with an Antivirus

Although macOS includes XProtect, a malware protection tool, it does not allow manual scans. It is therefore recommended to use a third-party antivirus for a thorough scan. Free solutions like Malwarebytes or Avast Security are effective at detecting and removing threats.

Monitor Mac Activity

Use Activity Monitor to identify suspicious processes:

  1. Open Launchpad and search for “Activity Monitor.”
  2. Examine processes that consume a lot of resources or have unusual names.
  3. Double-click the suspicious process and click “Quit.”

This step temporarily stops active malware.

Remove Suspicious Applications and Extensions

Malware often installs through applications or browser extensions:

  • Applications: Go to the Applications folder, identify unknown or recently installed software, and move it to the Trash.
  • Browser Extensions: For Safari, go to Preferences > Extensions and uninstall suspicious extensions. For Chrome and Firefox, go to the extension settings and remove unwanted ones.

Reset Browsers

Browsers can be targeted by malware that changes the homepage or search engine:

  • Safari: Go to Preferences > General and check the homepage. Then, under the Search tab, make sure the default search engine is legitimate.
  • Chrome: Go to Settings > On startup and check the startup pages. Then, under Settings > Search engine, confirm the search engine in use.
  • Firefox: Go to Options > Home to check the homepage, then to Search for the default search engine.

Clear Temporary Files and Cache

After removing malware, it is recommended to clean temporary files:

  1. Open Finder and select “Go” > “Go to Folder.”
  2. Enter ~/Library/Caches and delete the contents of the folders.
  3. Repeat with /Library/Caches.

This frees up space and removes potential malware residues.

Restore the System from a Backup

If problems persist, consider restoring your Mac from a previous backup using Time Machine. This allows you to return to a previously healthy system state.

Prevent Future Infections

To strengthen your Mac’s security:

Conclusion

Malware on Macs is no longer rare, and ignoring its presence can compromise personal, professional, or banking data security. Good digital hygiene — combining vigilance, appropriate tools, and regular updates — remains the best defense. When in doubt, it’s better to act quickly rather than let the problem worsen. A well-maintained Mac is a Mac that lasts.