How to Get Rid of Viruses: 3 Steps to Find and Remove Viruses From Your Computer

An infected computer is stressful, but here's a step-by-step guide to get rid of viruses.
Sara J. Nguyen, Author
Catherine McNally, Editor
Last updated Sep 15, 2022

Every day there are over 450,000 new malicious programs registered by the AV-TEST Institute. Attackers want you to install viruses so they can collect personal data (like discovering your password), push more ads, trick you into buying fake software, or merely to disrupt a computer system.

Despite our best attempts to keep our devices safe from hackers and scams, sometimes we unintentionally download viruses. While this is a stressful situation, read on to learn how to know if you have a computer virus, how to fix it, and prevent it from happening in the future.

In this article
Do I have viruses on my computer?
How to get rid of viruses on your computer
How to avoid computer viruses
Computer virus removal FAQs
Bottom line

Do I have viruses on my computer?

Knowing when you have a virus or malicious software (malware) is complicated since a virus is usually designed so you won't notice it's there. But there are a few signs which may indicate you have a virus on your computer:

  • Slow computer performance
  • Persistent pop-up windows
  • Apps and programs you don't recognize
  • Frequent crashes
  • Unauthorized and unusual activities like password changes
  • Contacts receiving emails from you that you didn't send

How to get rid of viruses on your computer

The first step for getting rid of viruses on any device is to download a good antivirus and security suite.

Without an antivirus software program, viruses can go virtually undetected. It may take some time for you to notice the signs of a computer virus, and by then it may be too late. The attacker could already have stolen valuable and sensitive information from your computer.

After you install antivirus software, the process to remove viruses is slightly different for PC and Mac. Keep reading to discover what you need to do to restore security to your computer.

How to clear viruses from a Windows PC

If you think your Microsoft Windows PC has a computer virus, follow this step-by-step guide to remove it.

Step 1: Install antivirus software

Windows 10 and 11 computers often include Windows Security (also commonly called Windows Defender, Windows Defender Security Center, or Microsoft Defender), which can detect and remove malware files.

However, the built-in Windows Defender software may not be good enough. This is because it doesn’t protect non-Microsoft programs by default. For example, if your primary browser is Google Chrome, Windows Defender can't help you unless you download the Microsoft Defender Browser Protection extension.

By downloading additional antivirus software, you give yourself the best possible tools to detect and remove viruses. Here are a few antivirus options compatible with Windows PC:

If you want to be extra cautious, you could run multiple virus scans from different security software providers to ensure they catch all viruses, especially newly developed malware.

Step 2: Reboot in safe mode

Safe mode is when the Windows PC starts with only the essential files and drivers. By using safe mode, it prevents the virus from blocking antivirus scans. Here is how to reboot in safe mode on a Windows 11 computer:

  1. Turn your computer on or restart it.
  2. On the Windows sign-in screen, press and hold the Shift key, then click Power > Restart. This will restart your computer.
  3. A "Choose an option" menu will appear. Select Troubleshoot, Advanced options, then choose Startup settings, and finally hit Restart.
  4. The restart will give you another list of options. You'll want to select 4 or press F4 to start your PC in safe mode without networking. This enables you to be in safe mode and stay offline. If you need internet access during safe mode, then select 5 or press F5.

Step 3: Run a full virus scan and uninstall infected files

Once you've installed antivirus software and rebooted your computer into safe mode, you're ready to run a virus scan. You'll want to follow the instructions from your chosen antivirus provider on how to do a virus scan.

The virus scan should detect any files with a virus and list them at the end of the scan. Then you can safely delete the infected files from your computer. You may want to run a second scan to ensure all viruses are removed.

Once you've completed a virus scan and removed all malicious files, you can exit safe mode. All you need to do is turn your computer off and start it back up as you would normally.

How to remove a virus from a Mac

Many people think Macs are safe from viruses, but it's not a 100% guarantee. Mac malware increased by more than 60% in 2020. If you’re a Mac owner, you should take precautions to make sure your computer is safely guarded against threats like viruses.

A Mac computer has a slightly different process to detect and remove viruses. Follow along with our step-by-step guide on how to remove viruses from a Mac.

Step 1: Install antivirus software

MacOS operating systems come with XProtect antivirus software already installed. It automatically scans for viruses without any extra work from you.

But XProtect does have some drawbacks. It's not great at blocking potentially unwanted programs (PUPs) or adware. This means your Mac could get infected even with XProtect.

To truly catch all possible viruses, you should install antivirus software compatible with your Mac. Some possible options include:

  • Webroot: Great for fast virus scanning and phishing detection.
  • Avast Security: Great for monitoring for malware, suspicious websites, and vulnerable Wi-Fi networks.
  • Malwarebytes Anti-Malware: Great for computers already infected with malware.

You could run virus scans from different providers to ensure they catch all viruses, especially newly developed malware.

Step 2: Quit malicious applications

If you’re already suspicious about a specific program, simply uninstalling it may be enough to remove the virus. This could also be a good strategy if you recently downloaded files or apps and suddenly experienced crashing.

Here are the steps to take to quit malicious applications:

  1. Search for and open Activity Monitor.
  2. Search for known viruses like MacDefender, MacProtector, or MacSecurity. You could also view recent downloads.
  3. Double-click on the suspicious file and click Quit.
  4. Go to the Applications folder, find the suspicious file and move it to Trash.
  5. Right-click your Trash and choose Empty Trash to permanently remove the file.

Restart your computer to see if this fixes the problem or if the malicious app reinstalls itself. Either way, you may want to install an antivirus software program to confirm the virus is completely removed from your Mac.

Step 3: Reboot in safe mode

Like a Windows PC, entering safe mode on a Mac computer ensures a virus can't block antivirus software from properly running. Safe mode only runs the essential files and drivers, which makes it easier to detect the virus. Here’s the process to reboot in safe mode on a Mac:

  1. Restart your Mac computer.
  2. While it's booting, hold down the Shift button.
  3. Depending on what type of Mac you have, you may need to click Continue in Safe Mode or log in and choose Safe Boot.
  4. The Mac will open in safe mode.

Once rebooted into safe mode, run a virus scan to determine if you have any infected files. Then delete or quarantine the files. To exit safe mode, simply restart your computer and let it run normally.

How to avoid computer viruses

Having an awareness of best cybersecurity practices can also help change your habits to minimize the risk of inadvertently downloading a virus. Here are some tips to avoid computer viruses:

  • Use an antivirus software program with automatic scans for infections.
  • Don't click on pop-ups, especially if they appear even without the web browser open.
  • Don't open links or attachments in emails or social media messages where you don't know the sender.
  • Know how to download files safely.
  • Read user reviews of apps and programs before downloading them.
  • Keep systems and software updated to patch vulnerabilities.
  • Use a secure VPN, especially if you're using public Wi-Fi.
  • Occasionally delete temporary files and cached content.
  • Remove apps or browser extensions you no longer use.

Computer virus removal FAQs


+

Can you get a virus from visiting a website?

Yes, you can get a virus from visiting a website — even if you don't click on any links. Attackers are more sophisticated these days, and you only need to visit a fake or hacked website to have malicious code downloaded onto your computer.


+

Can iPhones get viruses?

iPhones are still capable of downloading viruses if you interact with a malicious email or website. As for malicious apps, iOS apps have to go through a rigorous security process before Apple will let them go live in the App Store. But don't worry too much because it's possible to remove malware from your iPhone.


+

Can resetting my PC remove a virus?

Resetting your PC by initiating a factory reset can remove viruses.

A factory reset deletes all files from your computer — including everything stored on your hard drive and most viruses. This isn't always ideal because if you don't have any data backup, you will lose valuable documents and photos in a factory reset. It may also not remove complex viruses. 

A better alternative would be to reboot into a safe mode and run a virus scan to pinpoint the exact files with a virus.

Bottom line

When you suspect your PC or Mac computer has a virus, the first step is to confirm it with a virus scan. Antivirus software is important to download in order to find viruses. Next, you'll want to reboot your computer into safe mode without networking. No internet connection and the lack of unnecessary files make it easier for a virus scan to run without malware stopping it.

Once you run the scan, you can delete or quarantine the affected files. Then you can start your computer normally and hopefully have a virus-free computer.

While built-in antivirus apps like Windows Defender and XProtect are better than nothing, you'll want to optimize your computer's protection by getting a fully developed antivirus program. It can go a long way in detecting viruses early before they wreak havoc on your computer and data. To look at more options, take a look at our best antivirus programs guide.

Author Details
Sara J. Nguyen
Sara J. Nguyen is a freelance writer specializing in cybersecurity and marketing. Her educational background in public relations helps her work closely with companies to provide informative and engaging content for their audience. When she's not writing, you can find her planning her next international trip.