How To Erase Virus | Remove Malware In 7 Steps

To erase a virus from a device, disconnect from the internet, run updated security scans, quarantine threats, remove suspicious apps, and change passwords afterward.

One infected file can lock a computer or drain a phone’s battery in hours. Knowing how to erase virus infections quickly can mean the difference between a clean device and a stolen identity. The seven-step sequence below covers every major platform — Windows, Mac, Android, and iPhone — and tells you exactly what to tap, click, and watch for at each stage.

What Does Erasing A Virus Actually Mean?

Erasing a virus means locating and disabling malicious software so it can no longer run, spread, or steal data from your device. The process ranges from removing a browser hijacker to wiping a system clean of deep-rooted malware. Most consumer infections fall in the mild-to-moderate range and respond well to security scans, app removal, and a careful step-by-step approach.

The key is order. Acting in the wrong sequence — for example, changing passwords before removing the malware — can give the attacker continued access. The industry-standard procedure, confirmed by sources including the FTC and Microsoft, follows a fixed progression: isolate, scan, remove, secure, and patch.

Removing A Virus From A Device: The Sequence That Works

Removing a virus from a device follows the same seven-step order whether you use a PC, a Mac, or a phone. Each step depends on the one before it.

  1. Disconnect from the internet. Turn off Wi-Fi, unplug Ethernet, or enable Airplane Mode. This stops the virus from communicating with a remote server or spreading across a network.
  2. Update your security software. Run the update before the scan. Outdated virus-definition files miss the latest threats. On Windows, Windows Security updates automatically; on Android, Google Play Protect updates through the Play Store.
  3. Run a security scan. On Windows, open Windows Security > Virus & threat protection and choose Quick scan first. Switch to Full scan if the quick pass finds nothing or you suspect a deeper infection. On Android, go to Google Play > tap your profile > Play Protect > Scan. On Mac, use your antivirus tool to run a full system scan.
  4. Quarantine or delete what is found. Security tools present options for each threat. Choose quarantine if you want the option to restore a false positive; choose delete if you are certain it is malware.
  5. Remove suspicious apps. On Windows, go to Settings > Apps > Installed apps and uninstall anything unrecognized. On Android, go to Settings > Apps and uninstall suspicious entries. On Mac, drag unwanted apps from Applications to the Trash and empty it. On iPhone, check for unfamiliar apps and delete them.
  6. Change your passwords after cleanup. Do this from a different, clean device if possible. Use strong unique passwords and turn on two-factor authentication for every account that offers it. The FTC’s malware removal guide recommends password changes as a mandatory final step because malware can expose credentials.
  7. Install all available updates. Apply OS and app updates to patch the vulnerabilities the virus used to gain entry. On Windows, check Settings > Windows Update. On Mac, use the Apple icon > About This Mac > Software Update. On Android, check Settings > System > System update.

Which Devices Need Different Steps?

Every device can get infected, but the cleanup tools and procedures vary by platform. The table below shows what each major OS uses for detection, removal, and the last resort if the infection survives.

Device Type Primary Detection & Removal Tool Last Resort If Infection Persists
Windows 10 / 11 Windows Security (Virus & threat protection) Factory reset or clean OS reinstall
macOS XProtect + third-party scanner (Malwarebytes, Kaspersky) Erase and reinstall macOS via Recovery Mode
Android Google Play Protect + Security Checkup Factory reset from Settings or Recovery Mode
iPhone / iPad iOS sandboxing + Safari cache clear + profile removal Factory reset via Settings > General > Transfer or Reset iPhone
Chromebook Built-in virus protection + Powerwash reset Powerwash (full reset) from Settings
Linux ClamAV or distribution-specific security tools Reinstall from live USB
Smart TV / IoT Factory reset from device settings Same — reset is the only reliable option

Entering Safe Mode For Stubborn Infections

Some malware blocks security tools from running during normal operation. Safe Mode loads only the essential drivers and services, which often lets your scanner work unimpeded.

On Windows 10 or 11, hold the Shift key while clicking Restart, then navigate to Troubleshoot > Advanced Options > Startup Settings > Restart. After the reboot, press 4 or F4 for standard Safe Mode, or 5 or F5 for Safe Mode with Networking if you need to download removal tools. On Mac, restart and hold the Shift key until the Apple logo appears — this boots into Safe Mode, which runs a disk check and loads only essential kernel extensions.

Run your security scan again while in Safe Mode. If the infection still resists removal, a secondary scanner from a different vendor can catch what the first tool missed.

Does Virus Removal Work Differently On Each Device?

Yes, because each platform has unique architecture and security boundaries. The general seven-step sequence stays the same, but the specific controls and pitfalls differ.

Windows. Windows Security handles most consumer threats without extra tools. Run a Quick scan first — it targets the most common infection spots. If nothing surfaces but symptoms persist, run a Full scan, which checks every file and running program. A secondary scan with Malwarebytes or another tool provides a useful second opinion.

Mac. macOS includes XProtect and Gatekeeper, which block known malware and unsigned software. Still, a dedicated scanner adds protection. Update macOS before scanning via Apple icon > About This Mac > Software Update. Remove any suspicious applications by dragging them to the Trash and emptying it — check the Login Items list in System Settings > General > Login Items & Extensions for anything unfamiliar.

Android. Google Play Protect runs continuously, but a manual scan adds confidence: open Google Play, tap your profile icon, choose Play Protect, and tap Scan. Clear cached data for browsers that behave oddly via Settings > Apps > Chrome > Storage > Clear Cache. Run Google’s Security Checkup at myaccount.google.com/security-checkup to review devices and sign-in activity.

iPhone and iPad. True viruses are rare on iOS because the operating system sandboxes each app. Most “phone virus” symptoms come from adware in Safari, push-notification spam, or rogue configuration profiles. Clear browser data in Settings > Safari > Clear History and Website Data. Remove any unknown configuration profiles under Settings > General > VPN & Device Management.

Common Mistake What To Do Instead
Waiting to act after noticing symptoms Disconnect from the internet immediately and start scanning
Deleting files before running a scan Let security tools detect and handle threats first
Trusting a single scan result Run a secondary scan with a different tool for confirmation
Changing passwords before cleanup is done Change passwords only after the malware is removed and from a clean device
Clearing browser data but ignoring apps Also uninstall suspicious apps and check for unknown profiles
Reconnecting to the network too soon Keep the device offline until scans, removals, and password changes are complete
Skipping OS updates after removal Install all available system updates to close the entry point

The Complete Virus Removal Sequence

A virus is erased by following seven actions in strict order. Disconnect from the internet. Update your security software. Run a scan and quarantine or delete what it finds. Remove apps you don’t recognize or trust. Change your passwords from a clean device and enable two-factor authentication. Then install every available OS and app update. Run a second scan to confirm the device is clean before reconnecting normally. If the infection survives, Safe Mode or a factory reset will finish the job.

References & Sources