How to remove a virus from Mac

Got a virus on your Mac? Here’s how to remove it

You may have heard it’s said that Macs don’t get viruses. That there’s no Apple virus. You may even have said it yourself. Sadly, it’s not true. Sure, there aren’t as many viruses on the Mac as there are on, say, Windows. But they do exist. And, it’s not just viruses you have to be wary of. There are all sorts of different forms of malware, from bits of code that download themselves and show you adverts for things you have no interest in, to really nasty bugs that steal your personal data.


How do I know if my Mac has a virus?

Before you remove a virus from a Mac, you need to be sure it actually has one. We’ve covered that in more detail in this article but here are a few pointers.

  • Your Mac starts behaving erratically and doing things you don’t expect;
  • Your Mac starts running very slowly, as if something is hogging the processor;
  • You start seeing adverts on your desktop;
  • You find software or applications you didn’t install.

These symptoms may mean your Mac has a virus, although there could be other explanations.


How to remove a virus from a Mac

Thankfully, there are lots of ways to do it. And Mac virus removal doesn’t have to cost money. 

1. Delete browser extensions

One of the most common types of malware comes in the form of browser extensions. Even extensions that aren’t particularly malicious can be annoying, and if you didn’t deliberately install them, they’re malware. Here’s how to get rid of unwanted browser extensions.

The manual way


  1. Launch Safari.
  2. Click in the Safari menu in the menu bar and choose Preferences.
  3. Click on the Extensions tab, look down the list and click on any extensions that look suspicious. Read the description of the extension. If you don’t remember installing it, click Uninstall.
  4. Repeat until you’ve removed all the extensions you don’t want.


  1. Launch Chrome.
  2. Click on the Chrome menu and choose Preferences.
  3. Click on the three vertical dots at the top right of the browser window (if you’re logged into a Google account, they’ll be under your name)
  4. Hover over More Tools and choose Extensions from the menu that appears.
  5. Look over the extensions in the browser window and click Remove on any that you don’t recognise.


  1. Launch Firefox.
  2. Click on Tools in the menu bar.
  3. Choose Extensions from the left hand side of the window.
  4. Check the extensions and click Remove on any you don’t recognise.

The easy way

That seems like quite a lot of effort, right? Thankfully, there is an easier way to remove browser extensions from your Mac. And it works for both Chrome and Safari. CleanMyMac 3 is a brilliant tool for getting rid of all sorts of unwanted files on your Mac and it makes it really easy to remove browser extensions. Here’s how.

  1. Launch CleanMyMac.
  2. Click on Extensions.
  3. Click on either Safari or Chrome.
  4. Check the box next to the extensions you don’t recognise.
  5. Click Remove.


2. Uninstall apps

Malware comes in lots of different forms. And it even comes disguised as security software to help you get rid of viruses! Devious, huh?

If you’ve inadvertently downloaded an app that turns out to be a virus, you need to uninstall it immediately. There are a couple of ways to do this. Here’s the hard way.

  1. Go to your applications folder and drag the app to the Trash.
  2. Go to your ~/Library folder and look in the Application support folder for any files related to the app and drag those to the Trash.
  3. Look in the other folders in ~/Library, especially Launch Agents and Launch Daemons and remove any files related to the app from there. But be careful, if you remove files used by legitimate app you could cause lots of problems.
  4. Repeat Step 3 for your Mac’ main Library folder.

The easy way: Uninstall apps in a few clicks

  1. Download and launch CleanMyMac.
  2. Click Uninstaller.
  3. Check the box next to the application name.
  4. Click Uninstall.


If you don’t know the name of the application, it’s more difficult. But if you use CleanMyMac, all you have to do is scroll through the list of applications and look for any you don’t recognise or don’t need and remove them. CleanMyMac removes every trace of an app, including files that you may overlook when you remove applications manually. This is particularly important for viruses, so it’s much better to use CleanMyMac.

3. Use an antivirus tool

While the above steps work very well in lots of cases, sometimes the Mac virus removal means using a dedicated antivirus application to scan and remove malware from your Mac.

There are lots of these applications available, and many of them are either free or allow you to at the very least scan your Mac for free to find out whether you need to take action. Be careful, however. It’s important to choose a tool from a reputable vendor. If you just Google ‘Mac antivirus tool’ some of the results near the top of the listings may well be for tools that are themselves malicious and instead of removing viruses from your Mac will infect it. Here are some reputable Mac antivirus tools:

  • Avast Free Mac Security
  • AVG Antivirus for Mac
  • BitDefender Antivirus for Mac
  • Kaspersky Internet Security for Mac
  • Intego Mac Premium Bundle X9

One common way that viruses embed themselves on your Mac is by putting files in the Launch Agents and Launch Daemons folders so they launch automatically. You can remove them manually, but if you delete the wrong file, you could create a problem for another, legitimate, application. CleanMyMac has a dedicated tool to remove Launch Agents and is much safer than doing so manually.

separator - protection

How to get rid of virus on a Macbook Pro (or any other Mac) if all else fails

If you’ve run through all the steps above and are still having problems trying to remove a virus from a Mac, the next step is to restore from a Time Machine backup. The benefit of restoring from Time Machine is that you can do it quickly and easily by booting into the recovery partition and you can choose to backup to a state just before your Mac started behaving erratically.

The downside of this option is that any work you’ve done since the backup you restore from will be lost. You could manually copy files from your Mac to another drive or cloud storage service before you restore and then copy them back afterwards. However, if one of those files is infected, you risk contaminating your Mac all over again. If there are documents you really need and that aren’t backed up elsewhere, use one of the antivirus tools above to run a scan on them before you copy them to another disk. That way you’ll know they’re safe.

Here’s how to restore from a Time Machine backup

  1. Make sure you’re connected to your Time Machine backup drive.
  2. Restart your Mac, holding down the Command and R keys until you see the Apple logo. When the macOS Utilities screen appears, choose Restore from a Time Machine Backup. Click Continue.
  3. Choose the last backup before your Mac started misbehaving or you suspect you were infected with a virus.

Your Mac will now return to the state it was in when you made that backup.

If you don’t have a Time Machine backup to restore from, the last resort is to reinstall macOS. This is a ground-zero approach. You’ll need to wipe your startup drive completely clean and start again. That means re-installing all your applications and copying all your data back to your Mac afterwards. If you have a recent backup of your data, from before your Mac became infected, you can use that to copy data from after you re-install. If not, you’ll need to back up important files now — but scan them with an antivirus tool first to make sure they’re not infected.

To perform a clean install of macOS, you’ll need a bootable installer disk. Creating one is beyond the scope of this article, but there is a comprehensive guide here

Once you’ve made your bootable installer, plug it into your Mac, go to System Preferences, choose Startup Disk and select the disk you just plugged in. Restart your Mac, holding down Command-R and do the following:

  1. When the macOS Utilities screen appears, select Reinstall a new copy of macOS. Click Continue and then Continue again when the next window appears.
  2. Agree to the terms and conditions and select your Mac’s internal disk.
  3. Click Install. Wait for your Mac to restart.
  4. Your Mac will startup as if it’s a new Mac and you’ll need to go through the process of setting it up from scratch.
  5. Once you’ve set it up, copy back the files you need from the backup and that you know aren’t infected.

As you can see, there are many different ways to remove a virus from a Mac, depending on how badly infected it is and what kind of virus it is. The main thing to remember is if you suspect your Mac is infected, don’t worry. It can be fixed!

These might also interest you: