How To Get Rid of a Virus on a Macbook (A Complete Guide)

How To Get Rid of a Virus on a Macbook

Its a fact that Mac OS are more tolerant to the viruses than the Windows OS. But in todays time, it can’t be said that Mac don’t get infected with Viruses or Malware. As they use sophisticated tactics to intrude inside the Mac, infect them. It can be severely damaging Trojan or Spyware and also an annoying Adware or browser hijackers. Besides removal of Virus, here you should also checkout 10 Best Ways To Protect A Mac Computer From Viruses.

So, before knowing how to get rid of a virus on a Macbook, you should first know the type of infection and then seek for the virus removal process.

How to Know If Your Macbook Is Infected With Virus?

An infected machine gives various signs of a virus infection. Like:

  • Your Mac may suddenly turn out to be slower than usual;
  • Takes a lot of time to startup, often times applications may crash or become non-responding;
  • Unknown process running under the Activity Monitor, showing high CPU usage;
  • You see unknown applications opening automatically at startup on Mac;
  • Your web browser seems to be hijacked or controlled by some unknown programs like extensions, plug-ins, fake search engine.
  • You encounter plenty of pop-up ads, redirection to unsafe pages that asks you to download some program or update applications.

Based on the above scenarios, there can be possible virus infection that may have contacted your Mac OS.

What Types of Virus Infections Attacks Mac Systems?

A variety of bugs and malicious software can infect your Mac, but the removal process is generally the same. Understanding the terms can be helpful.


A computer virus basically a malicious program or code that are programmed to conduct illicit tasks or actions on the target computer system. They have the ability to tamper the settings of the system, spread from one system to another via various means like phishing email attachments that supports macros to download the payloads of the virus and execute the code. Also, it can combine with other freeware program that users download off from any malicious sources.

Viruses often take advantage of any security flaws, vulnerability on the network or applications to infect any device. So, the best way on how to get rid of Virus on a Macbook is to scan it with anti-malware to clean it off.


Malware, is a collective name for various types of malicious software that can enter silently on your Mac and hamper its behavior. For instance:

  • Adware: – a type of malicious program that is intended to deliver unstoppable ads on the browser. The authors of the Adware may present it as a legitimate application that have some useful feature. However, once in, they runs ad-campaigns in order to earn their profit.
  • Browser Hijackers :- they arrive in the form of extensions, plug-ins or search engine that modifies default settings of the browser. This results in unexpected browsing behavior’s, searches redirects to Yahoo or Bing.
  • Spyware:-  programs that capable to intrude silently and spy in the user’s activities. They collect traces of browsing, system information and even some sensitive details.
  • Ransomware: – runs encryption algorithm that encrypts the files on the system with unique key and demands ransom to provide the decryptor key.
  • Trojans:-  disguise as a legitimate software, but have hidden motive, either to open the backdoor to allow hackers to remotely access the system.


PUPs are the most common threat that attacks the Mac systems. You can get PUA in various forms like fake download mangers, dubious extensions, fake system optimizers, PDF readers, file convertors and similar like these. Among, all the above threats, PUP are the least infectious, but too much annoying.

As they disguise as useful applications, and tampers the browser as well as system. Their presence leads to long-term issues on your Mac. Earlier, Windows OS was the hotbed for PUP and viruses, however this trend has now changed.

Unfortunately, despite various enhanced security measures, Mac’s security has been challenged by cyber-criminals.

How To Get Rid of a Virus on a Macbook

  1. Kill Malicious Processes
  2. Uninstall Malicious Applications
  3. Remove Fake Profile From Mac
  4. Remove Login Items
  5. Clean Your Web Browsers (Safari, Chrome)
  6. Run a Malware Scan To Ensure A clean Mac

Kill Malicious Processes:

If you know which is app or process is malicious, then your work is half-done already. Otherwise, you need to detect the malicious process and kill it from the Activity Monitor.

  • Open Activity Monitor by typing the name launchpad;
  • Look through the running process and try to locate the problematic one;
  • If found use [x] button in order to quit that process;
    Kill malicious process from Activity Monitor
    Kill malicious process from Activity Monitor
  • You can either choose “quit” or “force quit” options.

Uninstall Malicious Applications:

Next, it’s time to find and uninstall the unwanted program. Even if you didn’t see any malware in the Activity Monitor, still go through this process.

  • Open Application folder;
  • If you have figured out the name of the malicious applications, the look through the list. Otherwise, you can check which apps you don’t recognize/suspicious or have installed recently.
    Uninstall Malicious Applications
    Uninstall Malicious Applications
  • Right-click on the Malicious app and select “Move to Trash“;
  • Quickly empty your Trash bin.
This method works, if you know exactly which app is causing the issues. If not then, go on for the step 6 which shows scanning the Mac with anti-malware to detect the virus.

However, even if you trashed the app, it’s important to remove its associated files from various location of the system. So, you can either manually remove them by location the files and folder or use an expert tool like CleanMyMac X that lets you easily uninstall applications and its files easily.

Additional Tips: Check for apps you recently downloaded. Go to download folder on your browser and check for “.dmg” files. So, this will help detecting you the virus/malware. Delete the file and empty the trash.

  • On Finder menu, choose Go > Go to Folder;
  • Type ~/Library/LaunchAgents in the search box and click Go;
    Go To Folder
    Go To Folder
  • Now, find any suspicious items related to apps you deleted above. If found move them to Trash;
    Do the same for other locations:

    Remove LaunchAgents and Daemons
    Remove LaunchAgents and Daemons
~/Library/Application Support,
  • Empty your Trash Bin.

Remove Fake Profile From Mac:

Configuration profiles in Mac OS, defines set of rules letting administrations or workplaces to standardize settings on devices. As, as admin can create profiles to configure wi-fi settings, mail accounts, VPN, server connections and more.

Many times, Virus apps creates fake profile that connect to specific URL, restrict removal and so on. Thus, you should check for any profile configuration created by malicious programs. So you need to find and remove fake profiles.

  • Choose Apple menu→ System Preferences → Profiles;
    Remove Fake Profile From Mac
    Remove Fake Profile From Mac
  • Check for any unknown/fake Profile, select it and click on (—) minus button in the bottom;

Remove Login Items:

Login items are programs that launch automatically when your computer boots. If you see an application’s window as soon as you log in to your Mac, that’s a login item. Malware often sets itself up as a login item so it can relaunch every time your computer boots.

Here’s how to find and delete them:

To remove login items from Mac, follow the steps:

  • On the Apple menu > click System Preferences.
  • Next, choose “Users & Groups” icon;
  • With your Username chosen, switch to the “Login Items” tab.
    Remove Login Items From Mac
    Remove Login Items From Mac
  • Now, to disable unknown items from auto logins click on “—” sign at the bottom.
  • After that, restart your Mac, to make changes into affect.

Clean Your Web Browsers (Safari And Chrome):

Most of the viruses, adware or PUA get installed via fake pop-up alerts generated from suspicious pages. So, you should quickly close such pages and if you have clicked on allow for sending pop-ups ads to your browser. Then better to get rid of pop-up ads from web browsers, remove extensions and homepage redirects:

Clean Up Your Safari: 

Block Pop-up Ads from Safari Browser:
  • Open Safari Preferences from top menu.
  • Now, Switch to “Security” Tab;
  • Click on “Block Pop-ups Windows” and “Fraudulent Website Warning” settings.
To Disable JavaScript in Safari:

Uncheck Enable JavaSript option under “Security” Tab.

To Remove fake extensions from Safari, follow the below steps:
  • Click on Safari menu →Preferences → go to Extensions Tab;
  • Look for Fake/unwanted extensions active on your Safari;
    Remove Fake Extensions From Safari
    Remove Fake Extensions From Safari
  • To remove fake extension from Safari, Select it and click on “Uninstall”.
To Restore Your Homepage In Safari, Follow the below steps:
  • Click on Safari menu →Preferences → go to General Tab;
    Remove Unknown safari Homepage
    Remove Unknown safari Homepage
  • Under the “Homepage” field, remove unknown URL and enter address of your choice like “”.
Workaround, if Safari’s homepage has greyed out:

There are some instances, when you are not able to change your Homepage, this happens due to any adware/browser hijacker restricting it. In such case, your changes will not came into affect, so here is what you can try:

  • Click on Safari menu →Preferences → go to General Tab
  • Enter the homepage you want under the “Homepage” field, and avoid pressing return;
  • On the top of the window, you need to click on other settings like Tabs, Privacy, AutoFill and so on;
  • If you get a prompt to confirm changing your homepage address, the do so.
  • Now, again, go back to “General” tab, to check if your changes have been successful.
To remove Safari’s Preferences file, follow the mentioned steps:
  • Quit Safari browser.
  • Next, while you are on Finder, choose Go Go to Folder.
  • Under the Go to Folder pop-up window, type the following path and click “Go”:  ~/Library/Preferences/
  • Now, delete the file and launch your Safari again.
Clear Safari Cache:
  • You need to click Safari → Preferences →go to “Advanced” tab;
  • Next, in the bottom of the window, click on the checkbox showing “Show Develop menu in menu bar”;
  • Now, you will see a “Develop” menu on top bar, choose “Empty Caches”;

If you want to completely reset Safari, then here are the 3 ways to reset Safari without opening it.

In easy way to regularly clean your browsers whether Safari, Chrome or Firefox is by using CleanMyMac’s privacy tool. As it allows a quick view of all the extensions installed on your browsers. As well as removing cookies, browsing history, auto-fill data as well as saved passwords. You can choose what to clean by clicking on the checkbox.

Clean Up Your Google Chrome:

To get rid of Pop-up Ads On Chrome, follow the steps below:
  • To open Chrome’s main menu, click on three vertical dots on top-right corner. Next, click on “Settings”;
  • Locate “Privacy and Security” section, and click on “Site settings”;
  • Scroll down and click on “Pop-ups and redirects”; Here you will see website list showing pop-up notification;
  • To block pop-up ads on Chrome, click three vertical dots beside the Allow section, add the malicious URL and click “Block”;
To Remove Fake Extensions From Chrome Browser
  • Open Extensions page on Chrome type chrome://extensions/ on your address bar;
  • To remove fake Extension from Chrome, click on “Remove” beside the extension name.
Restore Your Homepage In Chrome
  • To access Homepage setting on Chrome type chrome://settings/appearance;
  • Here you see default homepage URL that opens every time you launch your browser. Remove it and type the new one you want.
  • Next, remove fake search engine, by typing chrome://settings/search
  • Under “Manage search engines”, click on the search engine you want to remove;
Reset Google Chrome Browser:

Use Reset Google Chrome From Mac, when you wish to remove all the unwanted changes made by any unknown program. It will delete cookies, cache, extensions, startup settings, homepage and new tab preferences. You should note that, it will not your saved passwords and bookmarks. (Better to Sync the browser with Google account to secure them).

  • Open Chrome’s menu by clicking on 3 dots on top-right corner, and click “Settings” from the menu;
  • Scroll to the bottom, and click on “Advanced”;
  • Under the section “Reset settings,” section click on “Restore settings to its original Defaults”;
  • Now, to reset Google Chrome browser on Mac, click on “Reset Settings”;
  • Click “Yes”, to the prompt asking to restart the browser.

This should fix your issue, however, often times malicious programs creates new policies that restrict the removal of unknown program after resetting. You need to check, if there is any unknown policies created by adware kind of programs. If you want to stop Chrome from opening automatically at login on Mac, then follow this tutorial.

To check Chrome’s policy simply type "chrome://policy" to your address bar.  Now to reset policies from chrome browser, follow here:

  • Open Terminal window by selecting Go to Finder → Go → Utilities → Terminal;
  • Now, you need to run the below commands and press “Enter” one by one.

defaults write HomepageIsNewTabPage -bool false
defaults write NewTabPageLocation -string ""
defaults write HomepageLocation -string ""
defaults delete DefaultSearchProviderSearchURL
defaults delete DefaultSearchProviderNewTabURL
defaults delete DefaultSearchProviderName

Relaunch Chrome. To reload default policies type  "chrome://policy"on the address bar. Now click on “Reload policies”.

Run a Malware Scan To Ensure A clean Macbook:

The best way to deal with malicious programs is to run a malware scan to detect the hidden files and components and remove them permanently. Although, if you already have any anti-malware program installed, then you can do a full-system scan to get rid of Virus on Mac.

But here we recommend you CleanMyMac X which is developed b y MacPaw and is notarized by Apple. Other than malware removal, it also has lots of useful features that comes handy in situations like these.

For example, real-time threat monitoring, application uninstaller, resetting browsers, freeing up system space, optimization and lots more.

  • Download CleanMyMac X.
  • Once it finishes the installation, launch it on your Mac.
  • From the left-menu section choose “Malware Removal“;
    Malware Removal using CleanMyMac X
    How To Get Rid of a Virus on a Macbook using CleanMyMac X (Image credit: MacPaw)
  • Press Click on “Scan“;
  • If it detects any sort of Adware, browser hijacker, spyware and even malicious programs, it will allow you to remove it.


Nupur is a tech writer at TechGeekSpace. She loves exploring latest tech, gadgets and have been writing on various topics related to technology, software, Gadgets, Windows, Mac, Internet, Android, and the latest tips and tricks.

Leave a Reply

Your email address will not be published. Required fields are marked *