What to do if your phone has a virus

If your phone is running slowly, showing pop-up ads you didn't click, draining battery faster than usual, or sending messages you didn't write, it may have malware. The fastest way to remove it is to restart your phone in Safe Mode, uninstall suspicious apps, and clear your browser cache and cookies. If that doesn't work, a factory reset will remove everything on the device — including the malware — but you'll lose all your photos, messages, and settings unless you've backed them up first.

Most phone viruses come from downloading apps outside the official store, clicking links in text messages or emails, or visiting compromised websites. Android phones are more commonly infected than iPhones because Android allows apps from sources other than the Google Play Store. Either way, the steps to remove malware are similar: identify what's wrong, remove the cause, and prevent it from happening again.

Key Takeaways

  • Restart your phone in Safe Mode first — this disables third-party apps and often stops malware from running so you can uninstall it.
  • Look for recently installed apps you don't recognize, especially ones with generic names or that ask for unusual permissions, and uninstall them.
  • Clear your browser's cache, cookies, and browsing history, which removes stored data that malware sometimes uses.
  • If Safe Mode doesn't work, a factory reset will remove the malware completely, but you'll lose all data unless you've backed it up to cloud storage first.
  • After removing the malware, only download apps from the Google Play Store (Android) or App Store (iPhone), and avoid clicking links in unexpected text messages or emails.

How to restart your phone in Safe Mode

Safe Mode disables all third-party apps — the ones you installed yourself — while keeping the phone's built-in functions running. This stops most malware from loading, so you can see what's actually causing the problem and remove it.

On Android, press and hold the power button until the power menu appears. Tap and hold "Power off" until a "Safe Mode" option shows up, then tap it. Your phone will restart with "Safe Mode" displayed at the bottom of the screen. On iPhone, there is no Safe Mode equivalent, so skip to the next section.

Once in Safe Mode, look at your apps and think about what you installed recently. If you see an app you don't remember downloading, or one with a vague name like "Update" or "System Tool", that's likely the problem. Tap and hold the app, select "Uninstall", and confirm. Restart your phone normally afterward.

Uninstalling suspicious apps

Even outside Safe Mode, you can remove apps that look suspicious. Go to Settings, then Apps (or Application Manager on older Android phones). Scroll through the list and look for anything you don't recognize or don't remember installing. Pay attention to apps with generic names, apps that ask for permissions they shouldn't need (like a flashlight app asking for access to your contacts), or apps you've never heard of.

Tap the app, then tap "Uninstall". If the button is grayed out, the app is a system app that came with your phone and isn't the problem. On iPhone, press and hold an app on your home screen, tap "Remove App", then "Delete App". If you're unsure whether an app is legitimate, search its name online — reviews and forums will usually tell you if it's known malware.

After uninstalling suspicious apps, restart your phone. If the problems stop — no more pop-ups, better battery life, normal speed — you've found and removed the malware. If the issues continue, move to clearing your browser data.

Clearing your browser cache and cookies

Malware sometimes stores data in your browser's cache and cookies. Clearing these won't remove the malware itself, but it will remove the stored data it uses and often stops unwanted pop-ups or redirects.

On Android, open Chrome (or your default browser), tap the three-line menu in the top right, go to Settings, then Privacy. Tap "Clear browsing data", make sure "Cookies and site data" and "Cached images and files" are checked, then tap "Clear data". On iPhone, go to Settings, scroll down to Safari, tap "Clear History and Website Data", and confirm.

After clearing your browser data, restart your phone and check whether the problem has improved. If you're still seeing pop-ups or unusual behavior, the malware may be deeper in the system, and a factory reset is the next step.

When to do a factory reset

A factory reset erases everything on your phone and returns it to the state it was in when you first bought it. This removes any malware that's embedded in the system, but it also deletes all your photos, messages, contacts, and settings. Only do this if Safe Mode and uninstalling apps haven't worked.

Before you reset, back up your important data. On Android, go to Settings, then Google Account, and tap "Manage your Google Account". Go to the Backup tab and make sure your photos, contacts, and messages are syncing to your Google account. On iPhone, go to Settings, tap your name, then iCloud, and turn on Photos, Contacts, and Mail so they sync to iCloud.

Once your data is backed up, go to Settings, search for "Reset" or "Factory Reset", and follow the prompts. The phone will restart and take several minutes to complete the reset. When it finishes, you'll see the setup screen as if the phone is brand new. Sign back into your Google or Apple account, and your backed-up data will restore automatically.

Preventing malware in the future

Most phone malware comes from three sources: apps downloaded outside the official store, links in text messages or emails, and compromised websites. To stay safe, only download apps from the Google Play Store on Android or the App Store on iPhone. These stores scan apps for malware before they're published, though nothing is 100 percent foolproof.

Be suspicious of text messages or emails that ask you to click a link or download something, especially if they come from unknown numbers or addresses. Legitimate companies like your bank or a delivery service won't ask you to confirm your password or update your payment information through a link in a message — they'll direct you to their official website or app instead.

Keep your phone's operating system updated. Go to Settings and look for "System Update" or "Software Update" — these patches fix security holes that malware exploits. Turn on automatic updates if your phone offers that option, so you don't have to remember to check manually.

Frequently Asked Questions

Can I remove a virus without losing my photos and messages?

Yes, if you catch it early. Safe Mode and uninstalling suspicious apps usually work without erasing anything. Only a factory reset requires you to erase the phone. If you back up your photos and messages to Google Photos or iCloud before resetting, you can restore them afterward without losing anything.

Is my iPhone safe from viruses?

iPhones are less commonly infected than Android phones because Apple controls what apps can do and where they can come from. However, iPhones can still get malware, especially if you've jailbroken the device or clicked a malicious link. The same prevention steps apply: only download from the App Store, don't click unexpected links, and keep your operating system updated.

What if I can't uninstall an app?

If the uninstall button is grayed out, the app is a system app that came with your phone. Go back to Safe Mode and look for other recently installed apps instead. If nothing in Safe Mode looks suspicious, try clearing your browser cache and cookies, or consider a factory reset if the problems persist.

Will restarting my phone remove a virus?

A simple restart won't remove malware, but restarting in Safe Mode will disable it temporarily so you can see what's causing the problem and uninstall it. After you uninstall the suspicious app, a normal restart will complete the removal.

Do I need antivirus software on my phone?

Most people don't. The Google Play Store and App Store both scan for malware, and keeping your operating system updated patches most security holes. Antivirus apps for phones are less effective than they are on computers and sometimes create more problems than they solve. Focus on not downloading apps from unknown sources and not clicking suspicious links instead.