Remove Malware from a Computer: Step-by-Step Guide
In this article
Yes, you can remove most malware yourself by disconnecting from the internet, booting into Safe Mode, running a full antivirus scan, and then cleaning up leftover files. This guide walks you through the process on Windows 10 and 11; Mac steps are noted where they differ. You'll need about 30–60 minutes and a second device (like a phone) to download tools if your PC is badly infected.
What You'll Need
- A working internet connection (ideally on a different device) to download removal tools if needed.
- A USB flash drive (optional, for transferring tools from another computer).
- Your Windows login password (you'll need it in Safe Mode).
- Antivirus software – Windows Defender is built-in and sufficient for most cases.
- Patience – a full scan can take 1–2 hours.
Step-by-Step
- Disconnect from the internet. Unplug the Ethernet cable or turn off Wi-Fi. This stops malware from sending your data or downloading more files.
- Boot into Safe Mode. Safe Mode loads only essential drivers and stops most malware from auto-starting. For Windows 10/11: click Start > Power, hold Shift, and click Restart. Then choose Troubleshoot > Advanced options > Startup Settings > Restart. After the PC restarts, press 4 or F4 to select "Enable Safe Mode." On a Mac: restart and hold the Shift key until the login window appears.
- Open your antivirus and run a full scan. In Windows, open Windows Security (search for it in the Start menu), go to Virus & threat protection, and click "Scan options." Choose "Full scan" and click "Scan now." On a Mac, use the built-in XProtect (no manual scan) or a third-party antivirus if you have one. Let the scan finish – it may take over an hour.
- Quarantine or delete detected threats. When the scan finds malware, the antivirus will ask what to do. Choose "Quarantine" (preferred) or "Remove." Quarantine isolates the file so it can't run, and you can delete it later. If the scan finds nothing but you're still suspicious, proceed to step 5.
- Run a second opinion scanner. Download Malwarebytes (free version) from the official website on a clean device, transfer it via USB if needed, install it, and run a "Threat Scan." This catches adware and browser hijackers that traditional antivirus often misses. On a Mac, Malwarebytes also has a free version.
- Check and reset your browser. Malware often changes your homepage or search engine. Open each browser (Chrome, Edge, Firefox) and go to settings. Look for "Search engine" and "On startup" sections. Reset them to your preferred defaults. If you see unfamiliar extensions, remove them. In Chrome: Settings > Extensions > Remove. In Edge: Settings > Extensions. In Firefox: Add-ons Manager.
- Clear temporary files. Use the built-in Disk Cleanup (Windows): search for "Disk Cleanup" in Start, select your drive, and check "Temporary files" and "Recycle Bin." This removes malware remnants that might be hiding there. On a Mac, you can skip this step – malware rarely hides in temp files.
- Update everything. Go to Settings > Update & Security > Windows Update and click "Check for updates." Update your browsers and any apps you use regularly. Patches fix security holes that malware exploits.
- Change your passwords. After removal, change passwords for email, banking, and social media – especially if you suspect keylogging. Use a different device or wait until you're sure the PC is clean. Enable two-factor authentication where possible.
- Restart normally. Exit Safe Mode by restarting your PC normally (don't hold Shift). Log in and check that everything works. If issues persist, see Troubleshooting below.
Common Mistakes
- Not disconnecting from the internet. Malware can keep downloading more payloads or lock you out (ransomware) while you're scanning.
- Running a scan in normal mode. Many malware processes hide from antivirus when running normally. Safe Mode is essential.
- Clicking "Allow" on pop-ups during the scan. Some malware shows fake alerts asking you to "allow" changes. Always choose "Quarantine" or "Deny."
- Using multiple antivirus programs at once. Running two real-time antivirus tools causes conflicts and can make your PC unstable. Stick to one (Windows Defender is fine) plus an on-demand scanner like Malwarebytes.
- Ignoring browser extensions. Even after a clean scan, a malicious extension can reinstall itself. Always check extensions.
- Not backing up before removal. If you have important files, back them up to an external drive first, but scan them before restoring – they might be infected.
Tips
- Use a USB drive with a portable scanner (like Malwarebytes Portable) if your PC won't boot normally.
- Keep Windows Defender on – it's free, built-in, and updated automatically.
- Enable "Controlled folder access" in Windows Security to block ransomware from encrypting your files.
- Regularly back up important files to an external drive or cloud service. This is your best defense against ransomware.
- If you're not tech-savvy, consider taking your PC to a professional repair shop – it's often cheaper than losing data.
Troubleshooting
If malware keeps coming back after removal: Reboot into Safe Mode again and run a full scan with a different tool (e.g., Malwarebytes if you used Windows Defender). Also check for suspicious startup programs: press Ctrl+Shift+Esc to open Task Manager, go to the "Startup" tab, and disable anything you don't recognize. If it still persists, you may have a rootkit – use Microsoft's offline scanner (Windows Defender Offline) which runs before Windows starts.
If your PC won't boot into Safe Mode: Try using Windows Recovery Environment (WinRE). Restart your PC 3 times, turning it off during the Windows logo to trigger WinRE. Then go to Troubleshoot > Advanced options > Startup Settings > Restart. If that fails, use a recovery drive (create one on another PC) or boot from a Windows installation USB.
If you get locked out (ransomware): Do not pay the ransom – it doesn't guarantee your files back. Disconnect the PC immediately. Try System Restore (if enabled) to roll back to before the infection. If that fails, you may need to reinstall Windows, which erases everything. Always keep backups to avoid this.
If the scan finds nothing but your PC is still slow: It might not be malware – it could be too many startup programs or low disk space. Use Task Manager to see what's using resources, and free up space with Disk Cleanup.
Frequently Asked Questions
Can malware survive a factory reset?
Yes, some malware (like rootkits) can hide in the firmware or recovery partition. A full reinstall of Windows from a USB drive (not the built-in reset) usually removes it, but firmware-level malware is extremely rare.
Is Windows Defender enough to remove malware?
Yes, for most common infections. It's a full antivirus with real-time protection. For stubborn adware, adding a second-opinion scanner like Malwarebytes is recommended.
How do I know if my computer has malware?
Common signs: sudden slowdowns, pop-up ads, browser homepage changes, new toolbars, unexplained data usage, or your antivirus being disabled. But some malware shows no symptoms – that's why regular scans are important.
Should I pay a ransom to get my files back?
No. Paying encourages the criminals and doesn't guarantee recovery. Restore from backups if you have them, or use free decryption tools from sites like No More Ransom (if available for your strain).
Can malware infect my Mac?
Yes, though less common than Windows. Mac malware often comes as fake antivirus or Adobe Flash installers. Use Malwarebytes for Mac and avoid downloading from untrusted sites.
How often should I scan for malware?
Run a full scan at least once a month. Keep real-time protection on and let it scan files as you download them. Also scan any USB drives before opening files.