How to Clean Viruses From Your PC (Step by Step)
In this article
Boot into Safe Mode, run a full scan with Windows Security (or your installed antivirus), remove what it finds, then restart and rescan clean. If the PC is locked or unusable, use a second computer to make a bootable rescue USB instead.
Time 1 hr · Steps 8 · Level Medium
Most infections can be cleared from inside Windows with a single full antivirus scan, and that is where you should start. The method changes only when the malware blocks the scanner, floods the screen with pop-ups, or stops the PC from booting at all — in those cases you work from Safe Mode or a rescue USB made on another machine.
Cleaning the PC
- Back up your files first. Copy documents, photos and anything you cannot lose to an external drive or cloud storage before deleting anything — about 10 minutes for a typical folder set.
- Disconnect from the internet. Unplug the ethernet cable or turn Wi-Fi off so the malware cannot download more of itself or send your files anywhere while you work.
- Boot into Safe Mode. Hold Shift while choosing Restart, then go to Troubleshoot > Advanced options > Startup Settings > Restart, and press 4 for Safe Mode. This stops most malware from running at startup.
- Delete temporary files. Type Disk Cleanup in the Start menu, select your C: drive, check Temporary files and Recycle Bin, and delete them. This removes files the malware may be using and speeds up the scan.
- Run a full scan, not a quick scan. Open Windows Security (or your installed antivirus), go to Virus & threat protection > Scan options, choose Full scan, and let it run — expect 30 minutes to a few hours depending on drive size.
- Remove or quarantine everything found. Follow the scanner's prompts to remove or quarantine each detection, then restart the PC normally and reconnect the internet.
- Update and rescan. Check for Windows updates and antivirus definition updates, then run a second full scan. A clean second scan is what tells you the infection is actually gone.
- Change your passwords. From a device you trust, change the passwords for email, banking and shopping accounts first — email is the reset key for everything else, so it goes first.
Menu names can differ slightly between Windows and antivirus versions, so if a label does not match exactly, look for the closest equivalent. If the scanner will not start, the scan window closes itself, or the PC will not boot, skip to the rescue USB approach below.
Scan Settings That Matter
The scan type you pick decides how much gets found, so know what each one does before you click.
| Scan type | What it checks | Typical time | Use it when |
|---|---|---|---|
| Quick scan | Startup folders and memory where malware usually loads | 5–15 min | Regular check-ups |
| Full scan | Every file on every drive, including external ones | 30 min – several hours | Known or suspected infection |
| Offline scan | Restarts the PC and scans before Windows loads | 15–30 min | Malware that hides from Windows |
| Bootable rescue USB | Scans from a USB stick, bypassing Windows entirely | 30 min – 2 hours | PC will not boot or scanner is blocked |
For a virus cleanup, always run the full scan even if the quick scan comes back clean — quick scans miss files that only a full pass reaches.
When Windows Will Not Cooperate
If the malware blocks the scanner or the PC will not start, you need to scan from outside Windows. On a second, clean computer, download a rescue USB tool from a well-known antivirus maker (most major ones offer one free), put it on a blank USB stick of at least 1 GB, then boot the sick PC from that stick — usually by pressing F12, F11 or Esc at startup and choosing the USB drive. The exact key varies by manufacturer, so watch the brief prompt on the first screen. Run the full scan from the USB environment, remove what it finds, then restart into Windows and run one more full scan from inside to confirm.
Blocked scanner or fake pop-ups
Pop-ups claiming your PC is infected and demanding payment are themselves the infection. Do not pay and do not call any number shown. Disconnect the internet, boot into Safe Mode, and run the full scan from there. If the pop-ups are in the browser rather than the whole PC, the fix is often simpler: open browser Settings, remove any extension you did not install, and reset the browser to its default settings.
Signs It Worked, and What Went Wrong
A clean second full scan plus normal behaviour — no pop-ups, no slowdown, no redirected searches — means the cleanup worked. Watch the PC for a week before you trust it fully.
| Symptom | Likely cause | Fix |
|---|---|---|
| Scan finds nothing but PC is still slow | Too many startup programs, or a failing drive | Open Task Manager > Startup and disable items you do not need; check drive health |
| Same detection returns after restart | Malware reinstalls itself from a scheduled task or a browser extension | Run the offline scan, then check browser extensions and remove unknown ones |
| Scanner will not open at all | Malware is actively blocking it | Boot from a rescue USB made on another PC |
| Browser keeps redirecting searches | Browser hijacker, not a system virus | Remove unknown extensions and reset the browser to defaults |
| Files now open as gibberish or demand payment | Ransomware | Disconnect from the internet, do not pay, restore files from your backup |
What Hurts the Cleanup
Several habits quietly undo a good scan. Running two antivirus programs at once makes them fight each other and miss real threats — keep one real-time scanner active and use a second only for occasional on-demand scans. Deleting files by hand before scanning destroys the evidence the scanner needs to remove the whole infection. Paying a pop-up's ransom demand funds the attacker and rarely unlocks anything. And reconnecting the internet before the second clean scan gives surviving malware a chance to reinstall itself. The most common mistake of all: no backup. Copy your files out before you start, every time, so even the worst outcome costs you nothing.
Follow-up questions
Should I just factory reset instead? A reset fixes almost any infection but wipes your installed programs and often your files. Try the scan route first; reset only if two clean scans cannot be achieved or the PC stays unstable.
How did the virus get in? Usually a downloaded file, an email attachment, a pirated program, or a fake "your PC is infected" ad clicked in a moment of panic. The same route can let it back in, so change the habit along with the files.
Do I need a paid antivirus? Windows Security, built into Windows, is a capable real-time scanner for most home users. Paid suites mainly add extras like extra firewall controls and identity features. One good scanner, kept updated, matters far more than which one.
When is the PC not safe to keep using? If banking or email passwords were typed while the PC was infected, treat those accounts as compromised and change them from a clean device before you log in anywhere on the repaired PC.
Official source: Microsoft Support