Food

How to Clean PC of Viruses: Step-by-Step

By Hayride Live · Updated · 4 min read

Start by disconnecting from the internet and restarting your PC in Safe Mode; this stops most viruses from loading and makes them easier to remove. The whole job takes about 30 to 60 minutes, and you’ll need a second device (like a phone) to download tools if your PC is badly infected. Follow the steps in order, and you’ll be back up and running with a clean system.

Before You Start: What You Need and Safety Checks

Before you begin, gather a few things and take a couple of precautions. You’ll need a USB flash drive (at least 8 GB) if your PC can’t download files normally, and access to another computer or phone to download a rescue tool if necessary. Also, back up your important files to an external drive or cloud service—but only files you trust, not suspicious ones. If you’re not sure a file is safe, leave it behind.

  • Back up critical documents, photos, and other files to an external drive or cloud storage. This protects you in case the cleaning process deletes something important.
  • Have your Windows product key handy (usually on a sticker or in your Microsoft account) in case you need to reinstall Windows.
  • Make sure your PC is plugged in if it’s a laptop; you don’t want it to shut down mid-scan.
  • Close all other programs and save any open work before you start.

Step-by-Step: How to Remove Viruses from Your PC

These steps work for Windows 10 and 11; menu names can differ slightly by version, but the general path is the same.

Step 1: Disconnect from the Internet

Unplug your Ethernet cable or turn off Wi-Fi. This prevents the virus from communicating with its command server and stops it from spreading to other devices on your network.

Step 2: Boot into Safe Mode

Safe Mode loads only the essential drivers and services, so many viruses won’t run. Here’s how:

  1. Restart your PC. When the login screen appears, hold down the Shift key while clicking Power > Restart.
  2. Your PC will restart into the blue recovery screen. Choose Troubleshoot > Advanced options > Startup Settings > Restart.
  3. After the restart, press 4 or F4 to enter Safe Mode. If you need internet access during the scan, press 5 or F5 for Safe Mode with Networking.

Step 3: Run a Full Antivirus Scan

Use the antivirus program you already have installed, or download one from a trusted source on another device and transfer it via USB. Windows Security (built into Windows) is a solid choice.

  1. Open your antivirus program. For Windows Security, go to Settings > Privacy & Security > Windows Security > Virus & threat protection.
  2. Click Scan options and choose Full scan (not Quick scan).
  3. Click Scan now and let it run. A full scan can take 1 to 2 hours on a typical PC, so be patient.
  4. If the scan finds anything, follow the prompts to quarantine or remove the threats. Quarantine is safer—it isolates the file so you can review it later.

Step 4: Use a Second-Opinion Scanner

No single antivirus catches everything. Run a second scanner like Malwarebytes (free version) to catch what the first missed. Download it on another device, transfer via USB, and run a full scan.

  1. Install and open Malwarebytes.
  2. Click Scan and choose Full scan.
  3. Let it complete; it usually takes 30 to 60 minutes.
  4. Quarantine anything it finds.

Step 5: Check for Unwanted Programs and Browser Hijackers

Many viruses install extra toolbars, adware, or browser extensions. Remove them manually:

  1. Go to Settings > Apps > Installed apps (or Apps & features).
  2. Look for programs you didn’t install, especially ones with odd names or that appeared recently. Sort by install date to make this easier.
  3. Select the suspicious program and click Uninstall. Follow the prompts.
  4. Repeat for all suspicious entries.
  5. Open your browser and check extensions/add-ons. Remove any you don’t recognize. In Chrome: Settings > Extensions. In Edge: Settings > Extensions.

Step 6: Remove Temporary Files

Viruses often hide in temp folders. Cleaning them out removes leftover junk and speeds up your PC.

  1. Press Windows + R, type %temp%, and press Enter.
  2. Select all files in the folder (Ctrl+A) and delete them. Skip any that say they’re in use.
  3. Repeat with temp (without the % signs) in the Run box.
  4. Empty the Recycle Bin.

Step 7: Restart and Verify Your PC Is Clean

After all scans and removals, restart your PC normally (not Safe Mode) and reconnect to the internet. Run one more full scan with your primary antivirus to confirm nothing is left. Check that your browser’s homepage and search engine are set to what you expect.

What If the Virus Won’t Go Away?

If the scans keep finding the same infection, or your PC still acts up, you may need a more drastic step. A factory reset or Windows reinstall wipes everything and gives you a clean slate. Before doing that, back up your files (again, only ones you trust) and make sure you have your product key. In Windows, go to Settings > System > Recovery > Reset this PC and choose Remove everything. This takes about 30 minutes to an hour and will erase all programs and personal files, so be certain you’ve saved what you need.

How to Avoid Getting a Virus Again

Prevention is mostly about habits. Keep your antivirus on and updated, and run a quick scan weekly. Don’t click links in emails from unknown senders, and avoid downloading software from pop-up ads or unofficial sites. Stick to well-known sources like the official app store or the developer’s website. Also, keep Windows updated—updates patch security holes that viruses exploit.

If a specific file or program keeps getting flagged, you can check it on a service like VirusTotal (upload the file, not your personal info) to see if multiple antivirus engines consider it malicious. But when in doubt, delete it.

Spotted a mistake? Tell us and we will correct it. How we write and check articles.