The fastest way to remove a virus depends on whether your computer still starts

If your computer starts normally, run a full scan with your existing antivirus software or Windows Defender (built into Windows). If it does not start, or if the scan finds nothing but the problem persists, you will need to boot from a separate device — a USB drive or external hard drive with antivirus tools on it — to scan before Windows loads. A computer that will not start at all may need to be taken to a repair shop, because some viruses lock the boot process itself.

The steps differ enough that you should know which situation you are in before you begin. A virus that slows your computer down is usually removable at home. A virus that prevents Windows from loading, or that keeps reappearing after removal, often requires professional help or a full reinstall.

Key Takeaways

  • Windows Defender, built into Windows 10 and 11, can remove most common viruses without buying additional software.
  • A full scan takes one to three hours and should run when you are not using the computer, because it uses significant processing power.
  • If a virus reappears after removal, or if your computer will not start, the infection is likely too deep for standard removal tools.
  • Backing up your files to an external drive before attempting removal protects your data if the computer needs to be wiped.
  • Some viruses hide from antivirus software until you restart in Safe Mode, which loads Windows with only essential programs.

Running a full scan with Windows Defender

Open Windows Defender by typing "Windows Defender" into the search box at the bottom left of your screen. Click "Virus & threat protection" on the left side. Under "Current threats," click "Scan options," then select "Full scan" and click "Scan now." Windows will begin scanning every file on your computer, which takes between one and three hours depending on how much data you have.

Do not use your computer while the scan runs. Close all other programs and let it finish completely. When the scan ends, Windows Defender will show you what it found. If it found threats, click "Remove" or "Quarantine" to isolate them. Quarantine moves the files to a locked folder where they cannot run, but does not delete them; if you are confident they are malicious, you can delete them from quarantine later.

After the scan completes, restart your computer. Some viruses only fully release their hold after a restart, and some antivirus tools cannot remove a file while it is running.

Booting into Safe Mode if the virus hides from standard scans

Safe Mode loads Windows with only the bare minimum programs needed to run — no third-party software, no network drivers, and no startup programs. Many viruses cannot run in Safe Mode, which makes them visible to antivirus tools. To enter Safe Mode, restart your computer and hold down the F8 key repeatedly as it starts up, before the Windows logo appears. On newer computers, you may need to hold Shift while clicking "Restart" in the Start menu, then navigate to "Troubleshoot" > "Advanced options" > "Startup Settings" > "Restart," and then press 4 or F4 to choose Safe Mode.

Once in Safe Mode, open Windows Defender again and run a full scan. The virus may now be visible and removable. After the scan completes and threats are removed, restart your computer normally. If the problem returns after restarting, the virus is likely embedded in a system file or boot sector, which requires professional removal or a full reinstall of Windows.

Creating a bootable antivirus USB drive for computers that will not start

If your computer will not start at all, you need to scan from outside Windows using a bootable USB drive. You will need a second computer and a USB drive with at least 4 gigabytes of space. On the working computer, read Kaspersky Rescue Disk (free) or Bitdefender Rescue Environment (free) from their official websites. Insert the USB drive, then use the software to write the antivirus tools to the USB. The process takes five to ten minutes.

Insert the USB drive into the infected computer and restart it. As it starts, press F12, F2, Esc, or Del (the key varies by computer model) to enter the boot menu. Select the USB drive from the list. The antivirus tools will load from the USB and scan your hard drive without needing Windows to start. This scan can take several hours. When it finishes, remove the USB and restart the computer to see if it now starts normally.

Removing malware that antivirus software misses

Some infections are classified as malware rather than viruses — they behave differently and hide in different places. If Windows Defender finds nothing but your computer is still slow, crashes frequently, or shows pop-up ads, run a scan with Malwarebytes (free version available). read it on the infected computer, install it, and run a full scan. Malwarebytes catches many threats that Windows Defender misses, particularly adware and browser hijackers.

After Malwarebytes finishes, restart your computer and run Windows Defender again. The two tools together cover most common infections. If both scans find nothing but the problem persists, the infection may be a rootkit — a type of malware that runs at the operating system level and is extremely difficult to remove without professional help.

When to back up your files and reinstall Windows

If a virus reappears within days of removal, or if your computer will not start even after Safe Mode and bootable scans, the infection is too deep for standard removal. At this point, backing up your files and reinstalling Windows is often faster and more reliable than continued removal attempts. Before you do this, connect an external hard drive to your computer (if it starts at all) and copy your important files to it. Do not copy system files or program files — only documents, photos, videos, and other personal data.

To reinstall Windows, you will need a second computer and a USB drive with at least 8 gigabytes of space. Go to Microsoft's Windows read page, read the Windows installation tool, and follow the steps to create a bootable USB. Insert the USB into the infected computer, restart it, and boot from the USB. Follow the installation prompts to wipe the hard drive and install a fresh copy of Windows. This process takes 30 to 60 minutes and removes the virus completely, but also removes all programs you have installed.

Preventing future infections

Keep Windows and all software updated. Viruses often exploit known security flaws in older versions of Windows, browsers, and plugins. Turn on automatic updates in Windows settings so you do not have to remember. Use Windows Defender or another antivirus tool at all times — do not disable it to make your computer faster, because the speed gain is not worth the risk.

Be cautious with email attachments and downloads. Do not open attachments from people you do not know, and do not read software from websites that look unprofessional or ask you to disable your antivirus to install. Viruses often spread through fake software installers, fake browser updates, and email attachments disguised as invoices or documents.

Frequently Asked Questions

How long does a full antivirus scan take?

A full scan with Windows Defender typically takes one to three hours, depending on how much data is on your computer and how fast your hard drive is. Solid-state drives (SSDs) scan faster than traditional hard drives. The scan uses significant processing power, so your computer will be slow while it runs.

Will removing a virus delete my files?

Antivirus software removes the virus but leaves your personal files intact. However, some viruses damage files as part of their operation, so files may be corrupted before removal. Malware that encrypts your files (ransomware) cannot be undone by antivirus removal — the files stay encrypted. This is why backing up important files regularly is critical.

What is the difference between a virus and malware?

A virus replicates itself and spreads to other files or computers. Malware is a broader category that includes viruses, worms, trojans, adware, and spyware — any software designed to harm your computer or steal information. Windows Defender and Malwarebytes together cover both categories.

Can I remove a virus with my antivirus software in the background?

You can, but it is slower and less thorough. A full scan works best when other programs are closed and your computer is not in use. If you run a scan while using your computer, the scan will pause whenever you open a program, and it may miss threats that are actively running.

What should I do if my computer will not restart after antivirus removal?

Some viruses are so deeply embedded that removing them breaks Windows. If your computer will not start after removal, boot from a Windows installation USB and choose "Repair your computer" instead of installing fresh. Windows will attempt to fix startup problems automatically. If that does not work, a full reinstall is usually necessary.