What to do if your phone has a virus

If your phone is running slowly, showing ads you didn't tap, draining battery fast, or sending texts you didn't write, a virus or malware may be running on it. The fastest way to remove it is to restart your phone in Safe Mode, uninstall recently added apps, and clear your browser cache and cookies. If that doesn't work, a factory reset will remove almost everything malicious — but it also erases your photos, messages, and other data, so back up what matters first.

The method you choose depends on whether you use Android or iPhone, how recently the problem started, and whether you can identify which app caused it. iPhones rarely get viruses because Apple controls what apps can do, but they can still get infected. Android phones are more vulnerable because Google allows apps from more sources, though the official Google Play Store screens for obvious threats.

Key Takeaways

  • Restart your phone in Safe Mode first — this disables third-party apps and often stops malware from running long enough for you to uninstall it.
  • Uninstall apps you don't recognize or recently added, especially ones that ask for unusual permissions like access to your contacts or camera.
  • Clear your browser cache, cookies, and browsing history, because malware often hides in cached data and can reinstall itself from there.
  • A factory reset removes nearly all malware but erases everything on your phone, so back up photos, messages, and documents before you do it.
  • After removing the virus, change your passwords on a different device, because malware may have recorded them.

How to restart your phone in Safe Mode

Safe Mode disables all third-party apps — the ones you installed yourself — while keeping the system apps that came with your phone running. This stops most malware from launching, so you can see what's actually happening and remove the infected app.

On Android: Press and hold the power button until the power menu appears. Press and hold "Power off" until a "Safe Mode" option appears, then tap it. Your phone will restart with "Safe Mode" written at the bottom of the screen. Once you're in Safe Mode, go to Settings > Apps (or Application Manager) and look for apps you don't recognize or recently installed. Tap each suspicious app and select "Uninstall". When you're done, restart your phone normally to exit Safe Mode.

On iPhone: iPhones don't have a traditional Safe Mode, but you can restart and immediately start force-closing apps. Restart your phone by pressing the volume up button, then volume down, then pressing and holding the side button until the power-off slider appears. Slide to power off, wait 30 seconds, then turn it back on. Immediately start closing apps by swiping up from the bottom of the screen (or swiping down from the top right on newer models) and swiping up on each app to close it, starting with the ones you recently added.

Uninstall suspicious apps and clear browser data

Malware usually arrives through an app that asks for more permissions than it needs — like a flashlight app that wants access to your contacts, or a game that wants permission to send text messages. If you recently installed something and the problems started around the same time, that's often the culprit.

Go to Settings > Apps on Android or Settings > General > iPhone Storage on iPhone and look at what you've installed in the last week or two. Anything you don't recognize, anything with a vague name, or anything that seems to do something different than its description should go. Tap it and select "Uninstall" or "Remove App".

Malware also hides in your browser's cached data. Open your phone's Settings, find the browser you use most (Chrome, Safari, Firefox), and look for options to clear cache, cookies, and browsing history. On Android, this is usually Settings > Apps > [Your Browser] > Storage > Clear Cache. On iPhone, go to Settings > [Browser Name] > Clear History and Website Data. Select "All time" to clear everything.

Do a factory reset if the virus persists

If Safe Mode, uninstalling apps, and clearing cache don't stop the problem, a factory reset will erase everything on your phone and reinstall the original operating system. This removes almost all malware, but it also deletes your photos, messages, contacts, and any data stored only on the phone itself.

Before you reset, back up what matters. On Android, go to Settings > System > Backup and turn on "Back up to Google Account" — this saves your contacts, calendar, and some app data to your Google account. On iPhone, go to Settings > [Your Name] > iCloud and turn on iCloud Backup, or connect to a computer and use Finder to back up to your Mac, or use iTunes on Windows.

Once you've backed up, go to Settings > System > Reset Options > Erase All Data on Android, or Settings > General > Transfer or Reset > Erase All Content and Settings on iPhone. The phone will restart and take several minutes to set up. When it's done, you can sign back in and restore your backed-up data.

Change your passwords after removing the virus

Malware often records passwords and sends them to whoever created it. After you've removed the virus, change the passwords for your email, banking apps, social media, and any other account with sensitive information — but do this on a different device like a computer, not on the phone you just cleaned.

Start with your email password, because your email account is the master key to resetting passwords for everything else. Then change your banking passwords, payment apps like PayPal or Venmo, and social media. If you use the same password for multiple accounts, change all of them.

Consider turning on two-factor authentication for accounts that offer it. This means even if someone has your password, they can't log in without a code sent to your phone or generated by an app like Google Authenticator.

How to prevent viruses on your phone going forward

Most phone viruses come from apps installed outside the official app store. On Android, only install apps from Google Play Store, and avoid sideloading apps from websites or email links. On iPhone, only install from the App Store — Apple reviews every app before it goes live, which makes infection much less likely.

Before you install any app, check the permissions it's asking for. A flashlight app should not need access to your contacts or location. A weather app should not need permission to send text messages. If an app's permissions don't match what it claims to do, don't install it.

Keep your phone's operating system updated. Apple and Google regularly release security patches that close holes malware uses to get in. Go to Settings > System > System Update on Android or Settings > General > Software Update on iPhone and install updates as soon as they're available.

Frequently Asked Questions

Can antivirus apps actually remove viruses from my phone?

Antivirus apps can find and remove some malware, but they're not a substitute for the steps above. Most antivirus apps work best as prevention — they monitor what new apps try to do and warn you before you install something dangerous. If your phone is already infected, Safe Mode and uninstalling the bad app usually works faster than running an antivirus scan.

What if I can't identify which app is causing the problem?

Start by uninstalling apps you don't use regularly, especially ones you installed just before the problems began. If you're not sure, uninstall it — you can always reinstall it later from the app store. If you still can't find the culprit after removing several apps, a factory reset is the most reliable option.

Will a factory reset remove all viruses?

A factory reset removes almost all malware because it erases everything and reinstalls the original operating system. However, if the virus is in your backup files or in an app you reinstall afterward, it could come back. After resetting, only reinstall apps you actually use, and avoid sideloading apps from outside the official store.

Is my data safe after I remove the virus?

Malware may have recorded your passwords, photos, or messages before you removed it. Change your passwords on a different device, and consider whether any sensitive photos or documents were on the phone. If you're concerned about identity theft, monitor your bank and credit card statements for unauthorized charges.

Do iPhones get viruses as often as Android phones?

iPhones get infected much less often because Apple controls which apps can be installed and what they're allowed to do. Android phones are more vulnerable because Google allows apps from more sources and gives them more access to your system. However, both can get infected, and both can be cleaned using the same basic steps.