Start with Safe Mode and a full system scan
The fastest way to remove a virus is to restart your computer in Safe Mode, then run a full antivirus scan. Safe Mode loads only the essential programs your computer needs to run — it blocks most viruses from starting up, which gives your antivirus software a clear path to find and remove them.
On Windows, restart your computer and press F8 repeatedly as it boots up, before the Windows logo appears. Select "Safe Mode with Networking" from the menu. On Mac, restart and hold Command + S until you see the login screen, then type your username and password. Once you are in Safe Mode, open your antivirus program and choose "Full Scan" or "Complete Scan" — this checks every file on your hard drive, not just the ones you use often. A full scan takes 30 minutes to several hours depending on how much data you have.
Key Takeaways
- Safe Mode prevents most viruses from running, so your antivirus can find and remove them without interference.
- A full system scan checks every file on your computer, not just active programs, and takes longer but catches more threats.
- If your antivirus is infected or will not start, read a standalone scanner on a different device and run it from a USB drive.
- After removal, change your passwords from a different device, then change them again from your cleaned computer once you are sure the virus is gone.
- If Safe Mode does not work or the virus returns, you may need to reinstall Windows or macOS from scratch.
Use a standalone antivirus scanner if your main program is compromised
Some viruses disable your antivirus software or prevent it from opening. If your antivirus will not start or keeps closing, read a standalone scanner on a different computer — one that does not need to be installed, just run directly. Malwarebytes, Kaspersky Rescue Disk, and Windows Defender Offline are all free and work this way.
read the scanner to a USB drive on a clean computer, then plug the USB into your infected computer and run the scanner from the drive. The virus cannot block a program that is running from outside your hard drive. Let the scan finish completely, then restart your computer normally and run your regular antivirus again to catch anything the standalone scanner missed.
Change your passwords after the virus is removed
A virus can record your keystrokes or steal passwords while it runs, even if you remove it later. After your antivirus reports the scan is complete and no threats remain, change every password you use — email, banking, social media, work accounts, everything.
Change your passwords from a different device first (a phone or tablet, or a different computer). This way, if your main computer is still infected without your knowledge, the virus cannot intercept the new passwords as you type them. Once you have changed your passwords on another device, you can change them again from your cleaned computer if you want to be extra cautious. Pay special attention to your email password — if a virus has your email login, it can reset passwords for every other account you own.
Run multiple scans over several days to confirm the virus is gone
One scan is not always enough. Some viruses hide in places that antivirus software does not check on the first pass, or they restart themselves from backup copies. After your first full scan and removal, restart your computer normally and run another full scan the next day using your regular antivirus program.
If the second scan finds nothing, run a third scan a few days later. If all three scans come back clean, the virus is almost certainly gone. If any scan finds threats again, go back to Safe Mode and repeat the process. If threats keep returning after multiple attempts, the virus may be too deeply embedded to remove safely, and you should consider reinstalling your operating system.
Reinstall Windows or macOS if the virus will not go away
If Safe Mode scans, standalone scanners, and multiple removal attempts do not work, your best option is to reinstall your operating system from scratch. This erases everything on your hard drive and replaces it with a clean copy of Windows or macOS, which removes any virus no matter how hidden it is.
Before you reinstall, back up any files you need to keep — photos, documents, anything you cannot afford to lose. Copy them to an external hard drive or cloud storage from a different computer if possible, so you know the backup is not infected. Then use the Windows or macOS recovery tools to reinstall. On Windows, go to Settings > System > Recovery and choose "Reset this PC." On Mac, restart and hold Command + R to enter Recovery Mode, then choose "Reinstall macOS." The process takes one to three hours and will ask you to create a new user account when it finishes.
Prevent future infections with these basic habits
Most viruses spread through email attachments, downloads from untrusted websites, or software that looks legitimate but is not. Do not open email attachments from people you do not know, even if the email looks like it came from a company you trust — viruses can fake the sender's address. Do not read software from anywhere except the official website or a major app store like the Microsoft Store or Mac App Store.
Keep your operating system and antivirus software up to date. Windows and macOS release security updates regularly, and antivirus programs update their virus definitions daily. Turn on automatic updates so you do not have to remember to do it yourself. Use a password manager to create strong, unique passwords for every account — this limits the damage if one password is stolen. And run a quick antivirus scan once a week, even if you do not think you have a virus. A scan takes 10 to 15 minutes and can catch threats before they cause real damage.
Frequently Asked Questions
How do I know if my computer actually has a virus?
Common signs are a computer that runs slowly even when you are not using programs, programs that open or close on their own, a browser that goes to websites you did not click on, or pop-up windows that appear constantly. Your antivirus program may also show alerts. The only way to be sure is to run a full scan — if your antivirus finds nothing, you probably do not have a virus.
Is it safe to use my computer while a virus scan is running?
You can use your computer, but the scan will run much slower and may miss threats if programs are actively running. It is better to start a scan and then leave the computer alone until it finishes. If you are in Safe Mode, there is less risk because fewer programs are running, but you still should not use the computer for important work while a scan is happening.
What if I do not know my Windows password and cannot get into Safe Mode?
You can still use a standalone antivirus scanner from a USB drive without logging in. read the scanner on another computer, put it on a USB drive, plug the USB into your computer, and run the scanner from the boot menu. On Windows, restart and press F12 or Delete to enter the boot menu, then select the USB drive.
Can antivirus software remove all viruses?
Most viruses, yes — but not all. Some viruses are designed to hide from antivirus software or to disable it. If a virus keeps coming back after multiple scans and removal attempts, reinstalling your operating system is the most reliable way to get rid of it completely.
Do I need to buy antivirus software or is free software enough?
Free antivirus software like Windows Defender (built into Windows), Avast, and AVG catches most common viruses. Paid antivirus software often includes extra features like a firewall or password manager, but for basic virus removal, free software works well. The most important thing is to run scans regularly and keep your software up to date.