How to remove a virus or any other malware from your Mac: Header image
Security 12 min read

How to remove a virus or any other malware from your Mac

Fact checked byMykhailo Pazyniuk

Published:Aug 4, 2026

Despite Macs’ reputation for having tight security by default, they can and do get malware, including viruses. Modern threats increasingly target macOS through fake apps, phishing pages, and malicious drive-by downloads. Backdoor malware targeting macOS rose 67% through 2025, according to Moonlock’s mid-2026 report, while adware accounted for 65% of all recorded infections.

If you suspect your Mac has been infected, you need to act quickly to minimize damage to your files and personal info. In this article, we’ll guide you through the different ways you can remove malware from your Mac and reduce the risk of future infections.

How to tell if your MacBook is infected with a virus or other malware

First, we’ll go over how to diagnose whether or not your MacBook has a virus or other form of malware.

You can’t allow malware to get a foothold on your system. If it does, your data is at serious risk of being stolen or damaged. Here are some signs you need to keep an eye out for.

Your MacBook is slowing down

All computers slow down at some point. Multiple programs can be running in the background, consuming the CPU and memory. Even having too many tabs open in your browser can also slow things down.

However, the following symptoms deserve special attention:

  • If it’s happening on a regular basis
  • If typing and moving the cursor becomes sluggish
  • If your CPU is continually at 95% or over
  • If your MacBook is frequently crashing
  • If your MacBook is overheating

These issues indicate that you have a problem going on in the background that needs to be investigated.

A good knowledge of different malware can assist you in understanding how and where you can catch it, so stay up-to-date with emerging threats.

Mykhailo Pazyniuk, Malware Analyst at Moonlock

Your Wi-Fi connection is not stable or has slowed down

When malware is on your computer, it often needs an internet connection to send back your data to its servers. That means your Wi-Fi connection is going to be taxed to the limit.

This will result in an unsustainable strain being placed on your network, which will end in the network just not being able to deal with that extra traffic and shutting down instead.

Again, losing your Wi-Fi connection occasionally is normal, but losing your connection many times in a short period could be something else entirely.

Unfamiliar apps appearing on your Mac

Some malware, including certain viruses, may arrive as separate apps that you don’t remember installing. In other cases, malicious code is hidden inside a legitimate program, modifying it from within rather than showing up as a new app.

Potentially unwanted programs (PUPs) often arrive bundled with software downloads from untrusted sources, even if the software itself is legitimate. 

Potentially unwanted programs (PUPs) often arrive bundled with software downloaded from untrusted sources. For example, popular apps like Adobe Photoshop, when downloaded from torrent or pirating websites, are likely to introduce malware to your device. The installer may appear legitimate and actually install a pirated version of Photoshop, but it might also silently install adware, browser hijackers, infostealers, or other malware. 

If you notice an app you don’t remember installing, especially after downloading software from an unofficial source, immediately uninstall it and get rid of the malware on your Mac. If the app or any of its components stick even after the removal, this is a strong sign that you have persistent malware on your device.

Your browser has been hijacked

We recently covered browser hijacking, which is when your browser settings are changed to redirect you to certain malware-infected websites and search engines that a hacker wants you to visit.

Even legitimate sites you want to visit can be redirected to similar-looking sites that, at first glance, may seem like where you want to go.

Pop-up ads are appearing all over your screen

One of the ways that more malware (including viruses) is brought onto your computer is through the use of pop-up ads on your screen. This is known as adware.

These pop-up ads will then entice you to click on links. In the case of scareware, you’ll be coerced into downloading a malware-infected “antivirus checker.” Yes, the irony is astounding.

Viruses usually come bundled with other malware such as data stealers or RATs, so only by removing each part of this package makes you safe again.

Mykhailo Pazyniuk, Malware Analyst at Moonlock

How to remove malware from your Mac

Once you’ve determined for sure that your Mac is infected with malware, your next course of action should be to fully remove it as soon as possible. The longer the malware is on your machine, the more damage it’s going to cause you. In 2026, while adware continues to be the most common type of malware, infostealers are showing the most growth at 68.2% of all new detections. So the longer you wait, the more logins and personal files you lose to the hacker.

Malware category distribution

While you can try to remove malware manually, this is very difficult, and you might still end up with fragments of the malware on your device.

Your best option is to use a specialized antimalware tool, like Moonlock, to remove a virus from your Mac. Sign up for a free trial of Moonlock and give it a shot.

Open Moonlock and go to the Malware Scanner

If this is your first time running a malware scan with Moonlock, you’re going to need to configure your scan. It takes less than a minute:

Screenshot of Moonlock, a Mac security app: The Malware Scanner screen.
  1. Open Moonlock antivirus and click on Malware Scanner (it’s the cool sunglasses icon).
  2. From the drop-down menu, click on Configure. This will open a pop-up window with scan settings.
  3. Under “Scan type,” you can select between Deep, Balanced, or Quick scan, with every type’s speed, depth, and purpose listed right below it. We recommend opting for a Deep scan and enabling all optional file types: archives, disk images (DMG), and packages (PKG).
  4. Once you’re happy with your choices, close the pop-up window. All your preferences will be saved for future scans.
  5. Click Scan.

Run the malware scan and wait for it to complete

Once you click Scan on the Malware Scanner tab, Moonlock will do all the work, methodically sifting through the files on your Mac, looking for anything suspicious and malicious. As soon as it finds anything, it’ll isolate it in Quarantine to stop it from further damaging your Mac.

Screenshot of Moonlock, a Mac security app: The malware scan results screen.

Review the monitoring results and remove everything

Moonlock antivirus concludes its scans by trapping every threat it finds in Quarantine, preventing it from further interacting with and harming your Mac. You’ll be presented with a list of all the threats it found, where you can take your time inspecting the files and then instructing Moonlock to fully remove them from your device.

Screenshot of Moonlock, a Mac security app: The Home screen.

Enable Moonlock’s real-time protection

While running a malware scan is great for one-off threats, you’ll need round-the-clock monitoring to really keep your Mac safe from harm. Moonlock’s real-time protection works quietly in the background, constantly checking your files, activity, and new downloads for anything suspicious.

  1. To turn on the real-time protection, you can follow these steps:
  2. Close the window.
  3. Open Moonlock antivirus.
  4. From the Home page, click Explore.
  5. On the right-hand sidebar, under real-time protection, click Options.
  6. In the new window, under “Continuous monitoring” tick the box for “Turn on real-time protection.”
Screenshot of Moonlock, a Mac security app: The Dashboard screen

Threat actors like to abuse the feeling of greed when you look for cracked apps, so always think twice about how you can get infected with malware.

Mykhailo Pazyniuk, Malware Analyst at Moonlock

Other ways to manually remove malware from a Mac

Moonlock, along with the built-in security tools on the Mac, will provide a rigid defense against anything a hacker tries to throw at you. But there are some other ways to get rid of malware on a Mac and remove viruses from your MacBook.

Check your browser extensions

Browser hijackers target your Mac through your browser, often changing extensions, homepages, and default search engine. If your browser is behaving suspiciously, check it first. Malicious files can be hiding in your browser settings, and getting rid of malware on your Mac starts with clearing those out.

Safari

If you mainly use Safari for browsing and you start noticing some weird behavior, you might need to check for a hijacker. Here’s how you do it:

  • Open Safari.
  • Click on Settings, then Extensions.
  • Review the list of extensions and remove anything you don’t recognize or no longer use.
  • To reset your homepage and search engine, go to Settings, then General, and set Homepage and New Windows and Tabs back to your preference.
  • To clear the cache, go to Settings, Advanced, check Show features for web developers, then use Develop, Empty Caches.
Safari Extensions settings where malicious extension linked to a Safari virus might be

Chrome

Third-party browsers are equally vulnerable to browser hijackers. So if you’re using Chrome, you might need to remove the virus from your Mac’s browser settings regularly:

  • Open Chrome.
  • Click on Settings, then Extensions.
  • Under Manage extensions, review the list of extensions and remove anything you don’t recognize or no longer use.
  • Reset your homepage and search engine under Settings, then Search engine, and Settings, then On startup.
  • To clear the cache, go to Settings, Privacy and security, Clear browsing data, and select Cached images and files.
A screenshot of the Extensions screen in Google Chrome's settings.
Google Chrome is a trademark of Google LLC.

Firefox

With Firefox, you need to inspect themes and add-ons, removing anything that might be malicious. This is a simple way to clear a virus on your Mac without needing extra software:

  • Open Firefox.
  • Click on the jigsaw puzzle piece icon in the top right-hand corner.
  • At the bottom, click on “Manage extensions.”
  • Under Manage Your Extensions, review all add-ons and themes, removing anything you don’t recognize or no longer use.
  • Reset your homepage and search engine under Settings, then Home, and Settings, then Search.
  • To clear the cache, go to Settings, Privacy & Security, and under Cookies and Site Data click Clear Data.

Check for suspicious configuration profiles

Configuration profiles are one way malware can gain control over your device, allowing malware to change your Mac’s security, network, or browser settings. You should regularly check your Mac for suspicious configuration profiles or ones no longer in use. Here’s how to do it:

  • From the Apple menu, go to System Settings, then Privacy & Security.
  • Under Profile, remove anything you don’t recognize, as it could be installed by malware.

Fully remove leftover files (Library, Launch Agents, Launch Daemons)

Malware rarely remains confined to a single file. Many forms of malware create multiple copies of themselves, and startup files that can survive app deletion and device reboot. To make sure you’ve fully purged your Mac from malware, you’ll need to check for leftover files:

  • Check ~/Library/LaunchAgents to find and remove any unknown startup agents.
  • Check /Library/LaunchAgents and /Library/LaunchDaemons looking for suspicious entries, as some of them might be malicious.
  • Empty the Trash and restart your Mac to apply changes.

Reset and wipe your MacBook

This is obviously the last-ditch nuclear option, but there are 2 major benefits to resetting and wiping your MacBook.

factory-reset-mac

The first benefit is that, in most cases, this should remove every piece of malware on your machine. Second, Apple has made the resetting and wiping process much easier over the past few years with the introduction of M-series Macs. It’s now faster and more streamlined. Just make sure you’ve backed up all of your important files before you wipe the whole hard drive.

On macOS Ventura 13 and later:

  1. From the Apple menu in the corner of your screen, go to System Settings.
  2. From the left-hand sidebar, click on General.
  3. Scroll down to  Transfer or Reset, click on Erase All Content and Settings.
  4. Follow the prompted instructions to fully reset your Mac.

On macOS Monterey 12:

  1. From the Apple menu in the corner of your screen, click on System Preferences.
  2. From the menu, click on Erase All Content and Settings.

What can you do if malware removal was unsuccessful?

Unless you completely wipe and reset your MacBook, there is a possibility that the malware may not be completely gone. No matter how strong an antivirus solution is, malware is constantly evolving, and eventually, a threat may be able to fight back against the antivirus.

In serious cases, the only thing you can do is wipe and reset the machine. You could also take the device to a professional IT technician, but keep in mind that many pros will likely wipe and reset the machine anyway. 

If you have a Time Machine backup created before the infection, instead of wiping your Mac clean when you reset it, you can opt for restoring a past version of your files. However, this only works if the backup itself is clean of malware. Otherwise, you’re reinfecting your Mac all over again.

Time-Machine

What else do you need to know about how to remove malware on a Mac?

We’ve already covered a lot of information regarding how to remove malware from your Mac. Here’s a quick summary of the most important points.

What is malware?

Malware is a blanket term for many kinds of cyber threats to your computer. This not only includes viruses but also spyware, scareware, ransomware, remote access trojans, and many more.

Can a MacBook be infected with viruses or other malware?

Despite what many people believe, a MacBook can indeed be infected with viruses and other malware. This is why it’s essential to have a Mac virus removal tool installed, such as Moonlock.

How dangerous is malware for your Mac?

Malware can cause different kinds of damage, such as data theft, file corruption, remote access to your machine, and much more. Viruses are especially dangerous because they spread by infecting your existing files and programs, making the problem grow quickly if not removed.

Do you need antivirus software to delete malware from your Mac?

You should ideally have third-party antivirus software installed on your Mac. The existing built-in security tools on a Mac are good, but extra backup is essential to ensure maximum protection.

Can your Mac remove a virus on its own?

The Mac’s XProtect feature can detect and remove viruses from your Mac by itself. However, it is not perfect, and it is possible that it may miss some threats lurking on your machine. That’s why third-party antivirus software is an excellent insurance to ensure that all threats are detected and destroyed.

How can you ensure that malware doesn’t infect your Mac again?

Having to remove malware on a Mac is a time-consuming and highly inconvenient experience. Once you’ve gotten rid of it, the last thing you need is for it to come back again.

So, how do you minimize that possibility?

Install all macOS and app updates immediately

A screenshot of the Software Update screen in macOS Settings.

This is the obvious first measure. Hackers exploit vulnerabilities in macOS and Mac apps to push their malware through. By installing all updates in a timely manner, you can help firmly close that door.

Install third-party antivirus software

Relying only on the security features native to your Mac isn’t enough. You need dedicated antivirus software that you can trust with the safety and privacy of your files. Moonlock is an anti-malware solution that’s both lightweight and highly efficient at what it does.

By running regular malware scans and enabling real-time protection, Moonlock will protect your Mac from all threats, big or small. You can try it out for yourself with a completely free 7-day trial and see how your Mac feels.

It can also strengthen your Mac’s built-in defenses, with the System Protection keeping an eye on your system settings and configurations, providing actionable advice on how to best set up your device.

Screenshot of Moonlock, a Mac security app: The System Protection progress screen

Restrict software to the App Store and trusted developers

The chance of you downloading a malware-infected piece of software from the Mac App Store is negligible due to Apple’s policy of rigorously vetting and scanning all App Store listings.

Obviously, nothing in life is guaranteed — malware could be invented tomorrow that can circumvent the App Store’s protections. But, compared to third-party developers on their own websites, the App Store is the safest place to be.

You can use trusted third-party developers such as MacPaw, who crafted Moonlock. If in doubt, do a web search for the name of the company and check them out.

Phishing links are the easiest “low-effort, high-reward” method of spreading malware. They can send the links out by email, text message, or chat message, or they can redirect people to a malware-infected website where those links are.

Basically, only click links if you absolutely trust the person. If you don’t completely trust them, err on the side of caution and don’t click it. It’s not worth the risk.

Don’t visit non-HTTPS websites

On the topic of malware-infected websites, do not visit websites that are not HTTPS-secured. Many of the top browsers today will warn you if you attempt to visit an HTTP website. You can override those warnings and proceed anyway, but it is not recommended.

Not all HTTPS websites are automatically safe, but they’re much safer than non-HTTPS.

The process to remove malware on a Mac is usually quite easy, especially if you have Moonlock antivirus onboard to protect your Mac. It makes quick work of any nasties that a hacker may try to covertly put onto your device.

The longer the virus or other malware is on your MacBook, the harder it can be to fully remove it. It will also start sucking up your personal data and damaging your computer. That’s why an aggressive approach is the best option.

This is an independent publication, and it has not been authorized, sponsored, or otherwise approved by Apple Inc. Mac, MacBook, and macOS are trademarks of Apple Inc.

MoonLock Banner
Ray Fernandez

Ray Fernandez

Ray has been covering tech and cybersecurity for over 15 years. His work has appeared on TechRepublic, VentureBeat, Forbes, Entrepreneur, and the Microsoft Blog, among others.