This wikiHow teaches you how to remove a virus from your Windows or Mac computer. In many cases, using a combination of your computer's built-in Safe Mode and an antivirus program will be enough to remove a virus. Keep in mind that not all viruses will be removable, meaning you may have to reinstall your computer's operating system from scratch to get rid of a virus.

Things You Should Know

  • You can use an antivirus program and Safe Mode to remove most viruses on Windows and Mac.
  • If the virus can't be removed, you may need to reinstall your computer's operating system.
  • If your computer is compromised with a virus, do not log into any important accounts that require you to input passwords.
Method 1
Method 1 of 2:

Windows

  1. 1
    Open the Windows Security panel. To open it, press the Windows key on your keyboard, type security, and click Windows Security in the search results.[1]
    • Windows 10 comes with Microsoft Defender, which is a full-featured antivirus/antimalware suite designed to protect your PC from viruses in real-time. As long as you keep Microsoft Defender running, it will catch most viruses and malware before they can be installed on your PC.
    • If you have any other apps open on your PC, you should close them now.
  2. 2
    Click Virus & threat protection. It's in the left panel.
    Advertisement
  3. 3
    Click Scan options. It's in the right panel.
  4. 4
    Select Microsoft Defender Offline scan. It's the final option in the list. This option is the most reliable for finding and removing viruses and requires you to restart your computer.
  5. 5
    Click Scan now. This reboots your PC into a safer offline mode so it can fully scan for viruses and malware.[2] The scan will take about 15 minutes and your PC will automatically restart when finished. If viruses or malware are found, Defender will immediately remove them.
  6. 6
    Re-open Windows Security and select Virus & threat protection. You'll want to do this as soon as your PC restarts after the scan.
  7. 7
    Click Protection history to view the results. If any viruses or malware were found during the scan, you'll see the actions taken by Microsoft Defender.
  8. 8
    Restart your computer in Safe Mode. Safe Mode is a version of your computer's operating system that loads only the necessary files and services, making it impossible for most viruses to run. You can restart into Safe Mode by doing the following:
  9. 9
  10. 10
    Delete your temporary files and system information. Do the following:
    • Click Clean up system files in the lower-left corner of the window.
    • Check every box in the middle of the window (you will have to scroll down to see the last few boxes).
    • Click OK, then click Delete Files when prompted.
  11. 11
    Download and extract Autoruns. Autoruns is a Microsoft tool that shows you the various programs that started up with your current session. To download and extract it, do the following:
    • Go to https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns in your computer's web browser.
    • Click the Download Autoruns and Autorunsc link near the top of the page.
    • Double-click the downloaded ZIP folder.
    • Click Extract all, then click Extract when prompted.
    • Open the extracted folder, then double-click the Autoruns file to open Autoruns.
  12. 12
    Use Autoruns to delete malicious files. Autoruns will give you a list of automatic startup processes and files that appeared when you started your computer. You can use this list to determine which of the services are actually viruses:
    • Find a suspicious service in the Autoruns list.
    • Look up the service online to confirm that it is a virus, making sure to note any removal instructions.
    • Delete the service and any files or folders related to it.
    • Repeat this process until you've removed all of the suspicious services from the Autoruns menu.
  13. 13
    Restart Windows. You can now restart Windows safely to regular mode. Just click the Start menu, select the Power option, and choose Restart.
  14. 14
    Change your browsers' home pages if necessary. A common virus strategy is to set your browser's home page to a malicious or ad-based website. You can change your browser's settings back to normal while in Safe Mode to prevent this from causing further harm.
    • In extreme cases, your computer's virus will corrupt the browser's files so that it can't be changed from within the browser settings. If so, you'll need to uninstall the browser in question and then reinstall it later.
  15. 15
    Run a Malwarebytes malware scan. If you're still having trouble, try using the free trial version of Malwarebytes' powerful antimalware application to see if it can find anything Microsoft Defender couldn't. Head to https://www.malwarebytes.com/premium and click FREE DOWNLOAD to download the software. Once it's downloaded, double-click the downloaded file and follow the on-screen instructions to scan your PC. If Malwarebytes finds a virus or other harmful files, it will walk you through the removal process.
    • Other freemium antivirus software includes Avast, Norton, and McAfee. If selecting another option, do research to make sure you are not downloading a fake antivirus.
  16. 16
    Reinstall Windows if necessary. If you can't get rid of the virus and you're unable to pay for a professional repair service to neutralize it, your best remaining option is to reinstall Windows and start over.
    • You can back up your files to prevent data loss, but keep in mind that doing this will most likely back up the virus as well.
    • If you can afford it, take your computer into a professional repair service before this step. They may be able to remove the virus for you.
  17. Advertisement
Method 2
Method 2 of 2:

Mac

  1. 1
    Force-quit persistent malware programs. If a program (or group of programs) is preventing you from restarting your Mac, do the following for the problematic program(s):[3]
    • Click Spotlight (the magnifying glass) in the top-right corner of the screen.
    • Type in activity monitor, then double-click Activity Monitor in the search results.
    • Click the CPU tab.
    • Select a program or service you want to force-quit.
    • Click X in the top-left corner of the Activity Monitor window.
    • Click Force Quit when prompted.
  2. 2
    Accept prompts to move malware to the Trash. If after a software update your Mac detects a known virus, it will prompt you to delete it. Click on Move to trash to move the malware to the trash and then empty the trash to remove it.
  3. 3
    Restart your Mac into Safe Mode. Safe Mode prevents all but the most basic of Mac programs from starting, making it easier to find and delete viruses:[4]
    • Click the Apple menu and select Restart….
    • Click Restart when prompted.
    • Immediately hold down the Shift key.
    • Release the Shift key when you see the login window appear.
  4. 4
    Download and install Malwarebytes. Malwarebytes is a free antivirus program that you can use to identify and remove viruses on your Mac:
    • Go to https://www.malwarebytes.com/mac-download in your web browser. The download should start automatically.
    • Double-click the downloaded PKG file and follow the on-screen instructions to install.
    • Other freemium antivirus software includes Avast, Norton, and McAfee. If selecting another option, do research to make sure you are not downloading a fake antivirus.
  5. 5
    Open Malwarebytes. Click the Spotlight magnifying glass icon at the top-right, type malwarebytes, and click Malwarebytes in the Spotlight search results.
  6. 6
    Click the Dashboard tab. It's on the left side of the Malwarebytes window.
  7. 7
    Click Scan now. You'll find this in the middle of the Malwarebytes window. Doing so prompts Malwarebytes to begin scanning your Mac for viruses.
    • This process can take over an hour to complete.
  8. 8
    Remove any discovered viruses. Once the scan completes, you can remove any viruses by clicking the Scan tab and then clicking Confirm in the middle of the page.
    • If Malwarebytes didn't find any viruses, you won't see the Confirm option here.
  9. 9
    Delete malicious apps if necessary. Some apps qualify as malicious without technically being viruses; common examples of this include toolbar apps and some fake antivirus scanners. You can delete such an app from the Applications folder (and your Mac) by doing the following:
    • Open Finder.
    • Click Applications on the left side of the page.
    • Find the app you want to remove.
    • Drag the app icon to the Trash.
    • Click and hold the Trash icon, then click Empty Trash when prompted.
  10. 10
    Remove any files associated with malicious apps. While deleting an app will minimize its impact on your Mac, you'll want to delete the app's folder contents as well in case the folder contains malicious files or scripts:
    • Open Spotlight, then type ~Library and press Return.
    • Find the folder for an app you deleted (the app's name should be in the folder).
    • Drag the folder to the Trash.
    • Empty the Trash by clicking and holding its icon and then clicking Empty Trash.
  11. 11
    Clear the Downloads folder. If you believe that you accidentally downloaded a file which triggered the virus on your Mac, consider clearing out the Downloads folder by opening Finder, clicking Downloads on the left side of the window, selecting the files in the Downloads folder, and moving them to the Trash.
  12. 12
    Change your browsers' home pages if necessary. A common virus strategy is to set your browser's home page to a malicious or ad-based website. You can change your browser's settings back to normal while in Safe Mode to prevent this from causing further harm.
  13. 13
    Restart your Mac. Click the Apple menu, select Restart..., and click Restart when prompted. This will restart your Mac into its normal mode. The virus(es) should now be gone.
  14. 14
    Reinstall your Mac's operating system if necessary. In extreme cases in which a virus has infected your whole Mac and you can't afford to take it in to a professional repair service, reinstalling the operating system from scratch is your best chance of recovering your Mac.
    • You can back up your files to prevent data loss, but keep in mind that doing this will most likely back up the virus as well.
    • If you can afford it, take your computer into a professional repair service before this step. They may be able to remove the virus for you.
  15. Advertisement

Expert Q&A
Did you know you can get expert answers for this article? Unlock expert answers by supporting wikiHow

  • Question
    What kinds of antivirus programs are there?
    Luigi Oppido
    Luigi Oppido
    Computer & Tech Specialist
    Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years.
    Luigi Oppido
    Computer & Tech Specialist
    Expert Answer

    Support wikiHow by unlocking this expert answer.

    So there real-time scanners and live-time scanners. Real-time scanners are always looking at what you're doing and they're constantly blocking potentially dangerous things from happening. Live-time scanners are kind of like gatekeepers. They do simpler scans periodically and check for malicious programs.
  • Question
    What's the best free antivirus for Mac?
    Luigi Oppido
    Luigi Oppido
    Computer & Tech Specialist
    Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years.
    Luigi Oppido
    Computer & Tech Specialist
    Expert Answer

    Support wikiHow by unlocking this expert answer.

    There actually aren't a whole lot of great antivirus programs for Mac that are free. There are a few options out there that are okay, but they aren't going to offer the protection you need.
  • Question
    Can you just delete a virus?
    Luigi Oppido
    Luigi Oppido
    Computer & Tech Specialist
    Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years.
    Luigi Oppido
    Computer & Tech Specialist
    Expert Answer

    Support wikiHow by unlocking this expert answer.

    It really depends on the virus, but just deleting a file is rarely going to remove anything. Use an antivirus or malware program to quarantine the virus and purge it from your computer.
Advertisement

Warnings

  • If your computer is locked down by a virus that requests payment, do not submit the payment. Chances are high that you won't get your computer unlocked either way, meaning you'll need to erase the computer and start over.
    ⧼thumbs_response⧽
  • Avoid downloading any third-party antivirus software that isn't reviewed and acclaimed by multiple trustworthy sources. Many malicious apps pretend to be antivirus programs or tools.
    ⧼thumbs_response⧽
Advertisement

About This Article

Luigi Oppido
Co-authored by:
Computer & Tech Specialist
This article was co-authored by Luigi Oppido and by wikiHow staff writer, Nicole Levine, MFA. Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years. This article has been viewed 1,494,867 times.
How helpful is this?
Co-authors: 114
Updated: October 25, 2022
Views: 1,494,867
Article SummaryX

1. Open the Windows Security panel.
2. Click Virus & threat protection.
3. Click Scan options.
4. Click Microsoft Defender Offline scan.
5. Click Scan now.
6. Re-open Windows Security > Virus & threat protection when scan is finished.
7. Click Protection history to view results.

Did this summary help you?
Advertisement