Download Article
Do a factory reset to get rid of stubborn viruses, trojans, and worms
Download Article
If you're battling a nasty virus on your computer or phone, performing a factory reset can fix the problem for good. With a few exceptions, doing a factory reset will remove viruses, spyware, keyloggers, and other types of malware—even tough infections that your antivirus software can't fix. This wikiHow article will explain how a factory reset can get rid of persistent viruses, explain those rare exceptions, and give you helpful tips on keeping your computer, phone, and tablet safe from malware.
Things You Should Know
- Performing a factory reset will almost always get rid of viruses and malware, but a reset will also erase everything that wasn't originally on your device.
- If the virus infected your backup, restoring from backup could bring the virus back.
- Viruses can sometimes infect boot sectors and peripherals, but it's not too common.
Steps
Section 2 of 5:
Should I do a factory reset?
-
Before resetting your device, try scanning for viruses and malware. Many viruses, spyware, trojans, and other malware can be removed quite easily using antivirus software like Microsoft Defender or Malwarebytes. If you can remove the virus with software, you'll save yourself the headache of losing important data and having to reinstall your favorite apps.
- Check out our detailed virus scanning and removal guides for Windows, macOS , Samsung Galaxy , Android, & iPhone to learn how to remove any type of virus or malware.
-
If you can't remove the virus, perform a factory reset. In most cases, the factory reset will completely destroy the virus. But because a factory reset will also delete your personal data, it's best to use a factory reset as a last resort.
Advertisement
Section 3 of 5:
How do viruses survive factory resets?
-
The virus infected the backup. If the virus attached itself to files in your backup, restoring from the backup will reinfect your freshly-installed operating system. To prevent reinfection after a factory reset, you'll want to run an antimalware scan on your backup before restoring your files.
-
The virus installed a rootkit or bootkit. Some viruses target parts of your device that are on the actual motherboard rather than within the file system itself, such as the Android xHelper trojan that attacked phones and tablets in 2019. [1] X Research source Fortunately, these viruses aren't as common as other types of malware thanks to modern system protections built into operating systems like Windows, macOS, Android, and iOS. [2] X Research source
- If you have a Windows PC, you can often remove rootkits and bootkits by performing a scan using Microsoft Defender Offline , which runs in a trusted environment outside of the operating system. [3] X Research source
-
The virus infected your recovery partition. If you perform a factory reset by way of your device's recovery partition, there is a slight risk the virus may have penetrated those files. These files are generally kept very separate from your operating system, so there's a good chance you won't have to worry about this problem.
- If your recovery partition is infected, you can do a factory reset using a system recovery disc , a bootable system USB drive, or by flashing your phone or tablet.
-
The virus infected connected peripherals. If the virus infects a device that's connected to your computer, such as your printer, webcam, or Wi-Fi adapter, it can reinfect the system after a recovery. This can happen with unsigned firmware in said devices, which fortunately, is not often a problem. [4] X Research source
-
The virus infected an external drive, such as a USB flash drive. If there is malware on a drive that you connect to your computer, it can easily reinfect your device after a reset. Be sure to scan your drives for viruses before reconnecting and disable autorun in Windows before reconnecting.
Advertisement
Section 5 of 5:
Tips to Avoid Getting Viruses
-
Keep your device up to date. Each time your device manufacturer releases an update, prioritize installing that update as soon as possible. These updates often include important security fixes that address vulnerabilities in the operating system, which can keep viruses away.
- If you're using Windows, you can check for updates in Settings > Update & Security (Windows 10) or Settings > Windows Update (Windows 11).
- On a Mac, you can check for updates in Apple Menu > System Settings > General > Software Update (Ventura and later) or Apple menu > System Preferences > Software Update (Monterey and earlier).
- On Android, go to Settings > System > System updates to update your phone or tablet .
- On an iPhone or iPad, go to Settings > General > Software Update to check for and install updates .
-
Use antivirus and antimalware software. If you have Windows, macOS, or an iPhone/iPad, there's no need to install antivirus software—these features are built into the operating system. For extra protection, you can opt for a free antivirus scanning tool like Malwarebytes or Avast .
- While you can't perform a scan on a Mac, iPhone, or iPad, you can rest assured that your Apple device is doing work behind the scenes to keep you protected .
-
Only install apps from your device's app store. These days, most apps you'll need are available through a simple app store that's built into the operating system. While there might be a need to install software by downloading directly from the developer, stick to your device's app store whenever possible to reduce the risk of malware.
- If you have Windows, stick to the Microsoft Store for your app installs, as the apps available in the store go through a vetting process.
- The same goes for your Mac—if you stick to the apps available in the Mac App Store, you will reduce your risk of malware infection.
- If you have an Android, Google Play Protect actively scans the apps you install from the Play Store for viruses and malware.
-
Don't root or jailbreak your phone or tablet. When you root your Android or iPhone so you can install apps from other app stores, you leave your device vulnerable to risks you wouldn't have to worry about when using the Play Store or App Store. You also won't benefit from important operating system updates designed to fix vulnerabilities, which can leave you exposed.
-
Protect your home Wi-Fi network. If your Wi-Fi access point at home isn't secure, everything you do on the internet is exposed. Make sure your Wi-Fi network is using WPA2 or WPA3 security, that your firewall is enabled, and that your router's firmware is up-to-date.
- Check out our guide on securing your home network for more tips to keep you safe.
-
Use caution when connecting to public Wi-Fi networks. When you connect to Wi-Fi at a café, in the library, or anywhere else that's public, your connection may not be private. To prevent other users on the network from being able to see the data you send over the internet (including your banking information and passwords), always use a VPN with public Wi-Fi. [5] X Trustworthy Source Federal Trade Commission Website with up-to-date information for consumers from the Federal Trade Commisson Go to source
-
Always read each screen when installing software. As you install new programs on your PC or Mac, read each screen thoroughly before jumping to the Next or Continue option. Software you install may try to sneak other programs in as you move from the installation screens, which is an easy way for malware to get into your system. [6] X Trustworthy Source Federal Trade Commission Website with up-to-date information for consumers from the Federal Trade Commisson Go to source
-
Don't click links in emails and text messages. One way people spread viruses to others is by sending phony phishing emails and texts that look like legitimate messages from software developers, banks, and computer manufacturers. If you get an email that instructs you to sign in to a service or download a program to keep using the service, proceed with caution.
-
Be wary of pop-up messages that claim you have viruses or malware. Many people inadvertently install viruses and malware because they see scary pop-up messages that claim their systems are infected or are having performance issues. If you see a pop-up with an ominous message about your computer, close the window, shut down your web browser, and run a complete antivirus scan instead.
-
Check downloaded files and attachments with Virus Total. Virus Total is a free web-based tool that can scan files, domains, IP addresses, URLs, and even Google search results for viruses and malware. [7] X Research source To use the tool, visit https://www.virustotal.com/gui/home/upload .
Advertisement
Expert Video
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Expert Interview
References
- ↑ https://securelist.com/unkillable-xhelper-and-a-trojan-matryoshka/96487/
- ↑ https://www.microsoft.com/en-us/security/blog/2017/10/23/hardening-the-system-and-maintaining-integrity-with-windows-defender-system-guard/
- ↑ https://learn.microsoft.com/es-es/defender-endpoint/malware/rootkits-malware
- ↑ https://eclypsium.com/2020/2/18/unsigned-peripheral-firmware/
- ↑ https://consumer.ftc.gov/articles/how-safely-use-public-wi-fi-networks
- ↑ https://consumer.ftc.gov/articles/how-recognize-remove-avoid-malware#avoid
- ↑ https://www.virustotal.com/gui/home/upload
About This Article
Thanks to all authors for creating a page that has been read 65,197 times.
Advertisement