This article provides a guide on eliminating viruses from Windows or Mac computers. In most scenarios, using the built-in Safe Mode and an antivirus program is sufficient to remove viruses. However, it's important to note that not all viruses can be eradicated; in such cases, reinstalling the operating system may be necessary.
Steps
On Windows
Open Windows Defender if possible.Begin
windows defenderWindows Defender Security Center- If you cannot open Windows Defender due to a virus, skip this step and the next one.

Initiate a quick scan in Windows Defender. You can do this by clicking on the Virus & threat protection tab in the left pane of the Windows Defender window and selecting Scan now. This allows Windows Defender to search for, isolate, and remove common viruses.
- You may need to click ☰ in the top-left corner of the window to see the Virus & threat protection tab.
- This may not work for stronger viruses, but it can help eliminate some malicious files before proceeding further.
Restart your computer in Safe Mode.Begin
Power
Launch Disk Cleanup.Start
disk cleanupDisk Cleanup
Remove temporary files and system information. Follow these steps:
- Click on Clean up system files at the bottom-left corner of the window.
- Check all the boxes in the middle of the window (you may need to scroll down to see the last few boxes).
- Click OK, then select Delete Files when prompted.
Open Windows Defender.Start
windows defenderWindows Defender Security Center
Click on Virus & threat protection. This option is located on the left side of the window.
- You may need to click ☰ in the top-left corner of the Windows Defender window.

Click on Scan Options. You will find this link below the large Scan now button in the middle of the page.

Ensure the "Full scan" box is checked. This is the option at the top of the page. A full scan provides a thorough cleanup of your computer, but note that Windows Defender may take over an hour to complete this process.

Click on Scan now. This button appears at the bottom of the scan options list. Windows Defender will begin scanning your computer.

Remove detected malicious programs. When Windows Defender identifies harmful software, it will notify you and may ask for confirmation to delete these programs. Follow the on-screen instructions to eliminate the malicious software.

Download and extract Autoruns. This Microsoft tool shows programs that launch with your current session. Here’s how to download and extract it:
- Visit https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns using your computer’s browser.
- Click the Download Autoruns and Autorunsc link near the top of the page.
- Double-click the downloaded ZIP folder.
- Click Extract all, then select Extract when prompted.
- Open the extracted folder and double-click the Autoruns file to launch the tool.

Use Autoruns to delete malicious files. Autoruns provides a list of programs and files that start automatically when your computer boots. Use this list to identify and remove suspicious services:
- Look for questionable services in the Autoruns list.
- Research the service online to confirm it’s malicious, noting removal instructions.
- Delete the service and any associated files or folders.
- Repeat this process until all suspicious services are removed from Autoruns.

Change your browser’s homepage if necessary. A common tactic of viruses is to set a harmful or ad-filled website as your browser’s homepage. You can reset your browser settings while in Safe Mode to avoid further issues.
- In severe cases, the virus may corrupt browser files, preventing changes through the browser’s settings. If this happens, uninstall and reinstall the browser.

Restart your computer in Safe Mode. Repeat the process you used earlier to boot your computer into Safe Mode.

Run Windows Defender Offline Scan. This scan can detect viruses or malware that you or previous scans may have missed:
- Open Windows Defender.
- Click on Virus & threat protection in the left pane.
- Select the Run a new advanced scan link.
- Check the box for "Windows Defender Offline scan."
- Click Scan now.
- Wait for your computer to restart and follow the on-screen instructions from Windows Defender.
Restart your computer once more.Start
Power
Restart⇧ Shift
Reinstall Windows if necessary. If you cannot remove the virus and cannot afford professional repair services to neutralize it, your best remaining option is to reinstall Windows and start fresh.
- You can back up your files to avoid data loss, but be aware that this may also back up the virus.
- If financially feasible, take your computer to a professional repair service before proceeding. They may be able to remove the virus for you.
On Mac
Force quit stubborn malicious programs.
Restart your Mac in Safe Mode.Apple menu

Download and install Malwarebytes. This is a free antivirus program you can use to identify and remove viruses on your Mac:
- Visit https://www.malwarebytes.com/mac-download/ using your web browser.
- Double-click the downloaded PKG file.
- Follow the on-screen instructions to install Malwarebytes.
Open Malwarebytes.Spotlight
malwarebytesMalwarebytes
Click on the Dashboard tab. This option is located on the left side of the Malwarebytes window.

Click on Scan now. This option is found in the center of the Malwarebytes window. Malwarebytes will immediately begin scanning your Mac for viruses.
- This process may take over an hour to complete.

Remove detected viruses. Once the scan is complete, you can delete viruses by clicking the Scan tab and selecting Confirm in the middle of the page.
- If Malwarebytes does not find any viruses, you will not see the Confirm option here.
Delete malicious applications (if necessary).
Finder
Delete files related to the malicious application. While removing the app reduces its impact on your Mac, you should also delete its associated data in case the folder contains harmful files or scripts:
- Open Spotlight, type ~Library, and press ⏎ Return.
- Find the folder of the deleted application (the application name will still appear in the folder).
- Drag the folder to the trash.
- Empty the trash by clicking and holding the trash icon, then selecting Empty Trash.

Clear the Downloads folder. If you suspect you accidentally downloaded a file that triggered the virus on your Mac, delete the Downloads folder by opening Finder, clicking Downloads on the left side of the window, selecting the files in the Downloads folder, and moving them to the trash.

Change your browser’s homepage if necessary. A common tactic of viruses is to set a harmful or ad-filled website as your browser’s homepage. You can reset your browser settings while in Safe Mode to avoid further issues.
Restart your Mac.
Restart...Restart
Reinstall your Mac’s operating system (if necessary). In severe cases where the virus has compromised your entire Mac and you cannot afford professional repair services, reinstalling the operating system is the best option to restore your Mac.
- You can back up your files to avoid data loss, but note that this may also back up the virus.
- If financially feasible, take your computer to a professional repair service before proceeding. They may be able to remove the virus for you.
Tips
- If you cannot remove the virus but know its name, try searching for the virus name online along with removal instructions. You may need to download a specific tool or follow detailed steps to eliminate the virus.
- It’s best to avoid running more than one antivirus program at the same time.
Warnings
- Avoid downloading third-party antivirus software that hasn’t been reviewed and endorsed by multiple trusted sources. Many malicious programs disguise themselves as antivirus tools.
- If your computer is locked by a virus demanding payment, do not rush to pay. Your computer may remain locked even after payment, meaning you’ll need to wipe and reinstall the system.
