The fastest way to remove a virus depends on what kind of device you have and whether it still starts up

If your computer starts normally, run a full scan with your existing antivirus software — Windows Defender (built into Windows), Malwarebytes, or Norton all have free or paid versions that can detect and remove most viruses. If the computer won't start, or if a scan finds nothing but the problem persists, you may need to boot into Safe Mode (where only essential programs load) and scan from there, or use a bootable antivirus tool like Kaspersky Rescue Disk that runs before Windows loads at all.

If the virus has disabled your antivirus software or you suspect it's hiding from scans, a factory reset — wiping the drive and reinstalling Windows or macOS from scratch — is the most reliable removal method, though it erases everything unless you back up first. For most people, a full antivirus scan catches the problem. For stubborn infections, Safe Mode scanning comes next. A factory reset is the nuclear option, but it works.

Key Takeaways

  • Start with a full scan using Windows Defender (free, built-in) or Malwarebytes, which removes most viruses without restarting your computer.
  • If a scan finds nothing but your computer still behaves oddly, restart in Safe Mode and scan again — viruses often hide from scans in normal mode.
  • Bootable antivirus tools like Kaspersky Rescue Disk scan your computer before Windows loads, catching viruses that disable your antivirus software.
  • A factory reset (wiping and reinstalling Windows or macOS) removes any virus but erases your files, so back up important documents first.
  • After removal, change passwords for email and banking accounts from a different device, because the virus may have logged your keystrokes.

Running a full antivirus scan in normal mode

Open your antivirus software and select "Full Scan" or "Scan All Files" — not a quick scan, which only checks common virus locations. On Windows, Windows Defender is already installed; open it by typing "Windows Defender" in the search box. On Mac, you'll need to install a third-party tool like Malwarebytes because macOS doesn't include a built-in antivirus scanner.

The scan can take 30 minutes to several hours depending on how many files you have. Let it finish completely. When it's done, the software will show you what it found. If it found viruses, click "Remove" or "Quarantine" — quarantine isolates the file so it can't run, while remove deletes it. Most of the time, this step solves the problem and you're done.

If the scan found nothing but your computer still has symptoms (pop-ups, slowness, strange programs in your taskbar), the virus may be hiding. Move to Safe Mode scanning before assuming you need a factory reset.

Scanning in Safe Mode when normal scans miss the virus

Safe Mode loads only the bare minimum — Windows, drivers, and essential services — so viruses that hide from normal scans often can't hide in Safe Mode. On Windows 10 or 11, restart your computer and hold down the Shift key while clicking the power button to shut down. Then turn it back on; you'll see a menu with "Troubleshoot" and "Reset this PC" options. Click Troubleshoot, then Advanced Options, then Startup Settings, then Restart. When the computer restarts, press 4 or F4 to enter Safe Mode with Networking (which keeps your internet on so antivirus updates can download).

On Mac, restart and hold Command+S immediately. You'll see a terminal window; type fsck -fy and press Enter, then reboot to restart in Safe Mode. Once you're in Safe Mode, open your antivirus software and run a full scan again. Viruses that hid in normal mode often get caught here because they can't load their hiding mechanisms.

After the scan finishes and removes any viruses found, restart normally. If the problem is gone, you're done. If symptoms persist, the infection is likely too deep for standard removal — a factory reset is your next step.

Using a bootable antivirus tool for infections that block your antivirus

Some viruses disable your antivirus software or prevent Windows from starting at all. A bootable antivirus tool runs from a USB drive before Windows loads, so the virus can't interfere. Kaspersky Rescue Disk and Bitdefender Rescue Disk are both free. You'll need a second computer and a USB drive with at least 1 GB of space.

Download the tool on the working computer, insert the USB drive, and follow the software's instructions to write the bootable image to the drive. Then insert the USB into the infected computer, restart it, and press F12, F2, or Delete during startup (the key varies by manufacturer — watch for a message on the boot screen). Select the USB drive from the boot menu. The antivirus tool will load and scan your hard drive. When it finds viruses, let it remove them, then restart normally.

This method works for infections that have disabled Windows Defender or your paid antivirus. If even this doesn't work, or if the computer won't boot at all, a factory reset is necessary.

Doing a factory reset when the virus won't go away

A factory reset wipes your hard drive and reinstalls Windows or macOS from scratch, removing any virus along with everything else on the computer. This is the most reliable removal method but also the most destructive — you lose all your files, programs, and settings unless you back them up first.

Before you reset, back up any files you need. Connect an external hard drive or use cloud storage like Google Drive or OneDrive to copy documents, photos, and anything else you want to keep. Don't back up executable files (.exe, .app, .msi) or your entire user folder, because the virus may be in those files and you'll just restore it.

On Windows 10 or 11, go to Settings, System, Recovery, and click "Reset this PC." Choose "Remove everything" and select "Remove files and clean the drive" for a more thorough wipe. The process takes 30 minutes to an hour. On Mac, restart and hold Command+R, click Disk Utility, select your hard drive, click Erase, then reinstall macOS from the recovery menu. After the reset completes, reinstall your programs and restore your backed-up files.

Changing passwords after virus removal

Even after you remove a virus, it may have logged your passwords while it was running. Change your passwords for email, banking, social media, and any other important accounts — but do it from a different device (phone, tablet, or another computer) to be safe. If you must use the same computer, wait until you're confident the virus is gone and you've restarted at least once.

Start with email, because email is the master key to your other accounts — if someone has your email password, they can reset your banking and social media passwords. Then change banking and financial accounts. For less critical accounts like social media or shopping sites, you can change them later.

If the virus was running for weeks or months before you noticed it, consider checking your bank and credit card statements for unauthorized charges, and watch your credit report for signs of identity theft. You can check your credit for free once a year at annualcreditreport.com.

Preventing viruses from coming back

Keep your antivirus software running and set it to scan automatically — most do this by default. Update Windows or macOS as soon as updates are available, because updates patch security holes that viruses use to get in. Don't disable Windows Defender or your antivirus to make your computer faster; the slowdown from a virus is worse than the slowdown from protection.

Be cautious with email attachments and downloads. Viruses often arrive as fake invoices, shipping notifications, or software installers. If you don't recognize the sender or weren't expecting the file, don't open it. Hover over links in emails to see where they actually go before clicking — a link that says "Click here" might actually point to a malicious website.

Use a password manager like Bitwarden or 1Password so you don't reuse the same password across sites. If one account gets compromised, the others stay safe. These tools also make it easier to use long, random passwords that are harder to crack.

Frequently Asked Questions

Can I remove a virus without restarting my computer?

Yes, a full antivirus scan in normal mode removes most viruses without restarting. However, some viruses lock files while they're running, so the antivirus can't delete them until you restart. If a scan finds viruses but says it can't remove them, restart and scan again.

Is it safe to use my computer while the antivirus is scanning?

It's safe, but the scan will run slower and may miss files that are currently open. Close your browser, email, and other programs before starting a full scan so the antivirus can check everything.

What's the difference between quarantine and remove?

Quarantine moves the file to an isolated folder where it can't run or spread, but keeps it on your computer in case it was a false alarm. Remove deletes the file permanently. For viruses, remove is safer — quarantine is useful for suspicious files you're not sure about.

Do I need to pay for antivirus software to remove a virus?

No. Windows Defender (free, built-in) and Malwarebytes (free version available) both remove most viruses. Paid antivirus software offers extra features like real-time protection and customer support, but the free versions work for removal.

Will a factory reset remove all viruses?

Yes, a factory reset removes any virus because it wipes the entire hard drive and reinstalls the operating system fresh. It's the most reliable removal method but also erases all your files, so back up anything you need first.