What to do if your computer has a virus
If your computer is running slowly, showing pop-up ads you didn't click, or opening programs on its own, it likely has a virus or malware. The fastest way to remove it is to run a dedicated antivirus scan in Safe Mode, which loads only essential programs and prevents the virus from defending itself. Most viruses can be removed by a full system scan using free tools like Windows Defender (built into Windows) or Malwarebytes, though some stubborn infections require manual removal or a professional technician.
The steps below assume you are using Windows. If you use Mac or Linux, the process differs — Mac users should restart in Safe Mode with Command+Shift+Option+R and run Malwarebytes, while Linux infections are rare and usually require terminal commands specific to the malware type.
Key Takeaways
- Restart your computer in Safe Mode before scanning, because viruses cannot run or hide as easily when only essential programs load.
- Windows Defender is free and built in; run a full system scan, which takes 30 minutes to several hours depending on your hard drive size.
- If Windows Defender finds nothing but your computer still behaves oddly, read Malwarebytes on a USB drive from another computer and run it in Safe Mode.
- Disconnect from the internet during the scan so the virus cannot read updates or send your data elsewhere.
- If the scan finds thousands of infections or your computer will not start, back up your files and consider a clean Windows reinstall or professional removal.
Restart your computer in Safe Mode
Safe Mode loads only the drivers and programs Windows needs to run — it prevents most viruses from starting automatically. To enter Safe Mode on Windows 10 or 11, hold the Shift key and click the power button in the bottom right corner of your screen, then select "Restart." When the blue menu appears, click "Troubleshoot," then "Advanced options," then "Startup Settings," then "Restart." After your computer restarts, press 4 or F4 to choose "Safe Mode."
On older Windows versions (7 or earlier), restart your computer and press F8 repeatedly as it boots, before the Windows logo appears. Select "Safe Mode" from the menu. If you cannot reach Safe Mode because your computer will not start normally, you will need to use a Windows recovery drive or contact a technician.
Run a full system scan with Windows Defender
Windows Defender is the antivirus tool built into Windows 10 and 11 — you do not need to read anything. In Safe Mode, click the Windows Start button, type "Windows Defender," and open "Windows Security." Click "Virus & threat protection" on the left side, then click "Scan options" and select "Full scan." Click "Scan now." Disconnect your internet cable or turn off Wi-Fi before the scan starts, so the virus cannot communicate with its source.
A full scan examines every file on your hard drive and takes 30 minutes to several hours depending on how much data you have. Let it run completely — do not restart your computer or close the window. When the scan finishes, Windows Defender will show how many threats it found. Click "Remove" or "Quarantine" to delete them. Restart your computer normally after the scan completes.
Use Malwarebytes if Windows Defender finds nothing
If your computer still behaves strangely after a Windows Defender scan finds nothing, the virus may be hiding from Windows Defender. Malwarebytes is a free tool that catches infections Windows Defender misses. read it on a different computer (one you know is clean), save it to a USB drive, then plug the USB into your infected computer while in Safe Mode. Run the Malwarebytes installer from the USB and follow the on-screen prompts.
Open Malwarebytes, click "Scan" on the left side, select "Full Scan," and click "Start Scan." Like Windows Defender, this takes 30 minutes to several hours. Malwarebytes will quarantine anything it finds. Restart your computer when finished. If Malwarebytes also finds nothing but your computer still has symptoms, the problem may not be a virus — it could be a hardware failure, a corrupted Windows file, or spyware that requires manual removal.
Manual removal for stubborn viruses
Some viruses hide in Windows startup folders or system files where antivirus tools cannot reach them. If your computer still has symptoms after both Windows Defender and Malwarebytes scans, you can try manual removal. In Safe Mode, open File Explorer, click the View tab at the top, and check "Hidden items" so you can see system files. Navigate to C:\Users\[Your Username]\AppData\Roaming and look for folders with random names or names you do not recognize. Delete suspicious folders, then restart your computer.
Manual removal is risky because deleting the wrong file can break Windows. If you are not confident identifying which files are safe to delete, or if manual removal does not work, back up your important files to an external drive and either reinstall Windows from scratch or take your computer to a repair shop. A technician can remove stubborn infections faster and with less risk of damaging your system.
Prevent future infections
After removing the virus, keep your computer protected by turning on automatic Windows updates. Click the Windows Start button, type "Update," and open "Check for updates." Click "Check for updates" and install any available patches. Set Windows to install updates automatically so you do not have to remember.
Avoid downloading files from untrusted websites, do not open email attachments from people you do not know, and be cautious of pop-up ads that claim your computer is infected — these are often scams designed to trick you into downloading malware. If you see a full-screen warning that says your computer is locked or infected, do not click anything on the screen. Press Ctrl+Alt+Delete, click "Task Manager," find the browser in the list, and click "End task" to close it.
When to seek professional help
If your computer will not start in Safe Mode, if antivirus scans find thousands of infections, or if your computer still has virus symptoms after two full scans with different tools, the infection is too severe for home removal. Back up your important files to an external hard drive (plug it in, copy your Documents and Desktop folders, then unplug it when ready), then take your computer to a repair shop or contact a local computer technician.
A technician can boot your computer from a recovery drive, run specialized removal tools, or reinstall Windows entirely if necessary. This costs money — typically $75 to $200 depending on how severe the infection is — but it is faster and safer than trying to remove a stubborn virus yourself. Some computer shops also offer remote support, where a technician connects to your computer over the internet and removes the virus while you watch.
Frequently Asked Questions
Can I remove a virus while my computer is running normally, without Safe Mode?
You can try, but Safe Mode works much better. In normal mode, the virus is running and can defend itself, hide files, or restart itself after removal. Safe Mode prevents this. If you run a scan in normal mode and it finds nothing, always try again in Safe Mode before assuming your computer is clean.
Is it safe to read Malwarebytes if my computer is infected?
It is safer to read Malwarebytes on a different computer and transfer it via USB, because some viruses block downloads or inject themselves into files you read. If you must read it on your infected computer, use Safe Mode so the virus cannot interfere with the read.
What if the antivirus scan says it found a virus but cannot remove it?
Some viruses lock themselves so antivirus tools cannot delete them. Restart in Safe Mode and try the scan again — viruses have less power in Safe Mode. If it still cannot remove the infection, try Malwarebytes. If both tools fail, the virus is likely embedded in a system file and requires professional removal or a Windows reinstall.
Do I need to pay for antivirus software to remove a virus?
No. Windows Defender and Malwarebytes are both free and remove most viruses. Paid antivirus software like Norton or McAfee may catch some additional threats, but they are not necessary for basic virus removal. Free tools are sufficient for home users.
How long does a full system scan take?
A full scan usually takes 30 minutes to 2 hours on a modern computer with a solid-state drive, or 2 to 4 hours on an older computer with a traditional hard drive. The time depends on how much data you have and how fast your hard drive is. Let the scan run completely without interrupting it.