Avast Academy Security Security Tips How to Remove a Virus From an iPhone and iPad

How to Remove a Virus From an iPhone and iPad

Is your iPhone acting up? If you think there’s a virus or other malware infection on your iPhone or iPad, keep reading. We’ll show you how to get rid of viruses on your iPhone and explain where iPhone malware comes from. Then, learn how to protect your devices against iOS malware and other threats with smart digital hygiene and specialized iOS security software.

Editors' choice
Top Rated
Written by Ivan Belcic
Published on June 3, 2022

How to get rid of a virus or malware on an iPhone and iPad

If you’ve found a malicious or suspicious app on your phone, it's time to remove the virus from your iPhone completely. Here’s how to remove malware from an iPhone:

Hamburguer menu icon

This Article Contains:

    1. Restart your iPhone

    The easiest way to get rid of an iPhone virus is to restart your phone. Hold down your phone’s power button for a few seconds until you see the “slide to power off” option. Move the slider to the right to turn off your device.

    After waiting for a few seconds for your phone to power down, press the power button again to restart your iPhone.

    2. Update iOS

    Many types of malware rely on vulnerabilities in outdated versions of iOS to infect your iPhone or iPad. When Apple releases iOS software updates, they often include security fixes. Update your phone’s software to close these security holes and get rid of any viruses that may be infecting it.

    Here’s how to update your iPhone:

    • Open the Settings app.

      Opening the Settings app on iOS
    • Tap General.

      Accessing the general settings in the Settings app for iOS
    • Tap Software Update.

      Accessing the software update options in the Settings app for iOS
    • Tap Download and Install.

      Tap Download and Install to update your iOS software version.
    • Follow the on-screen instructions to complete the update. Your iPhone or iPad will now have the latest version of iOS. If you have an iPhone 12, iPhone X, or another model, you may need to enter your PIN or use Face ID or Touch ID.

    3. Clear your iPhone’s browsing history and data

    If you think clicking an infected link on a suspicious website may have given your iPhone a virus, try clearing the history and data from your browser. Here’s how to delete your iPhone browsing data on Safari. You can follow a similar procedure if you use Chrome or another browser.

    • Open Settings and select Safari.

      The Settings menu in iOS 12.4
    • Tap Clear History and Website Data.

      The Safari Settings menu in iOS 12.4
    • Then tap Clear History and Data. Clearing your iPhone’s browsing history should get rid of any iPhone malware that you may have picked up by clicking on a malicious link or visiting an infected website.

      The "Clear History and Data" prompt in the Safari menu in iOS 12.4

    4. Remove suspicious apps from your iPhone

    Unfamiliar apps on your iPhone could be malicious, so removing these suspicious apps is a good way to get rid of an iPhone virus.

    If you don’t remember installing an app, or if you never use it, you should delete it. If someone puts an app on your phone without your knowledge, like a parental control app, it becomes spyware. And you should always remove spyware from your iPhone.

    To remove suspicious apps, first scroll through your iPhone for apps you don’t recognize. When you find a suspicious app, long-press the app icon, and tap Remove App to get rid of the malware from your iPhone.

    Removing an app from iOS

    5. Restore your iPhone to a previous backup version

    Another way to get rid of an iPhone virus is to restore your iPhone or iPad to a previous backup state. If you restore to a backup made from before you noticed problems with your device, it should delete any malware that’s infected your iPhone.

    There are two basic ways to restore your iPhone: from a backup stored on your computer or from a backup saved on iCloud. To restore your iPhone to a version saved on your computer, go through iTunes. To restore your phone to a previous version using iCloud, first you need to see if this setting is turned on.

    To check if iCloud backup is enabled, go to Settings > iCloud and see if the option for iCloud Backup is turned on. If this option isn’t on, you’ll need to try another option above to get rid of the virus on your iPhone.

    Here’s how to use iCloud’s backup function to restore your iPhone to a previous backup version:

    • Go to the Settings menu and select General.

      The Settings menu in iOS 12.4
    • Scroll to the bottom and tap Transfer or Reset iPhone.

      Tap Transfer or Reset iPhone to restore your iPhone.
    • Select Erase All Content and Settings.

       Tap Erase All Content and Settings to prepare your iPhone for a restore.
    • If you want to perform a last-minute backup to iCloud, select Backup Then Erase on the pop-up window Otherwise, select Erase Now. Follow the on-screen prompts and confirmations, and enter your password as needed to complete the procedure.

      Erasing All Content and Settings in iOS 12.4
    • When your iPhone shows the Apps & Data screen, select Restore from iCloud Backup. You’ll be prompted to sign into iCloud. Then, select which iCloud backup you’d like to use.

    6. Factory reset your iPhone

    If none of the previous steps work, you can erase all the content on your phone and reset it completely to get rid of the virus on your iPhone. A factory reset restores your device to a like-new state — a reset wipes all your content, your apps, and your settings and configurations, then installs the latest version of iOS on your iPhone.

    The process for a factory reset is similar to the one for restoring your phone from a backup version. Go to Settings > General > Transfer or Reset iPhone > Erase All Content and Settings > Erase Now. When your phone reboots, it’ll look as though you have a brand-new iPhone.

    How to check for viruses and remove malware on your iPhone.

    How to check for viruses and other malware on iPhone

    If your phone has a virus or a different type of iPhone malware, it will behave differently than usual, making it easy to tell that your phone is infected.

    Check for viruses on iPhone by scanning it and looking for these symptoms of iPhone viruses and other iOS malware:

    • Apps crashing unexpectedly: If your apps suddenly begin failing for no apparent reason, use a malware removal app to scan your iPhone for viruses.

    • Unfamiliar apps on your iPhone: Unknown apps on your phone — apps that you didn’t download yourself and that weren’t pre-installed — can be a sign of an iPhone virus or malware.

    • Pop-ups showing on Safari: If you notice an increase in pop-ups when using Safari, there could be malware on your iPhone. Check for viruses on your iPhone by running an iPhone virus scan.

    • Unexplained charges on your account: Unrecognized charges may indicate that malware on your iPhone has hijacked your account or financial information.

    • Your device is jailbroken: Jailbreaking is when you undo Apple’s security restrictions on your iPhone or iPad to install unapproved apps. Jailbreaking leaves your device at a much higher risk of a malware infection.

    • A rapidly draining battery: Malware apps can use a lot of processing power, which in turn hogs your battery life. You may want to run a virus scan on your iPhone 12, iPhone 11, or older models.

    • High data usage: Some types of malware, such as spyware, transmit lots of data from your phone. Higher data usage than usual might be a sign that you have a virus on your iPhone.

    • A persistently hot phone: Malicious apps make your iPhone work harder, which will raise its temperature. Malware is a common reason why your phone is too hot. Regularly check for viruses on your iPhone to catch malicious apps and keep your phone cool.

    That’s how to check for viruses on an iPhone. You can also use a dedicated security app that will regularly check for and get rid of any malware before symptoms take over. And in the unlikely event that you've become a victim of Pegasus spyware, follow our guide to detecting and removing Pegasus.

    How do I know if my iPhone has a virus?

    The best way to know if your iPhone has a virus is to check for the following signs: unfamiliar or crashing apps, lots of Safari pop-ups, unusual charges or data usage, a rapidly draining battery, or a consistently hot phone.

    The most common way for viruses and other malware to infect your iPhone is if you’ve jailbroken your device. Apple’s closed ecosystem for developers makes it unlikely that you’ll get an iPhone virus otherwise. But though rare, iPhone malware isn’t unheard of — for example, the recent Pegasus malware attacks.

    As your device ages, you may notice a decrease in speed or battery life. That’s normal, and usually performance issues are caused by age or outdated software. So before considering how to remove viruses from your iPhone, try cleaning up your iPhone and boosting its speed.

    Do iPhone viruses go away?

    If your iPhone is infected with malware, it won’t go away on its own. Act quickly to remove the virus or malware from your iOS device and restore your privacy and security.

    How to protect your iPhone or iPad from malware

    To keep malware at bay and defend your iPhone or iPad against threats, use strong internet security measures that give you ongoing protection.

    Here are the most important steps you can take to protect your iPhone or iPad from viruses and malware:

    Turn on automatic iOS updates

    Updated software is one of your strongest defenses against iPhone malware. If you use the most current version of iOS, you shouldn’t need to worry about removing viruses from your iPhone.

    Here’s how to turn on automatic iOS updates on your iPhone:

    1. Open the Settings app.

      Opening the Settings app on iOS
    2. Scroll down and tap General.

      Opening the General settings in the Settings app for iOS
    3. Tap Software Update.

      Opening the Software Update settings in the Settings app for iOS
    4. Automatic Updates should be On by default. Tap to confirm or change your settings.

      The Software Update settings in the Settings app for iOS
    5. Toggle all settings to the right so they appear green.

      The Automatic Updates settings in the Settings app for iOS

    Your device will now download and install iOS updates as soon as they’re made available, keeping malware off your iPhone or iPad.

    Turn on automatic app updates

    Just like updating iOS can protect you against iPhone malware, so can updating all your apps. Set your iPhone or iPad to automatically update your apps to get ongoing malware protection.

    Here’s how to automatically update apps on iOS:

    1. Tap the Settings app.

      Finding the Settings app on iOS
    2. Scroll down and tap App Store.

      Opening the App Store settings in the Settings app for iOS
    3. Under Automatic Downloads, toggle App Updates to the right so the toggle is green.

      The App Store settings in the Settings app for iOS

    Download apps only from the App Store

    Apple maintains strict security standards for all the apps in the App Store. While their security isn’t 100% bulletproof, when you install apps from the App Store, you’re guaranteed the protection of Apple’s quality checks.

    Don’t jailbreak your iPhone

    Jailbreaking removes Apple’s built-in security measures and gives you unfettered access to your phone. This lets you customize iOS beyond its default options, and you can also install apps from outside the App Store. But jailbreaking leaves you vulnerable to malware and phone hacking.

    Never jailbreak your phone unless you’re confident in what you’re doing — and even then, be very careful.

    Don’t open strange attachments

    Whether you receive them via email, SMS, or via your favorite secure messaging app, never download and open attachments that you aren’t expecting to get. Unknown attachments can actually be malicious and may infect your phone with malware.

    In 2018, Jeff Bezos’s phone was hacked by a malicious file he received over WhatsApp from Saudi Crown Prince Mohammed bin Salman. As a result, Bezos’s phone immediately began exporting massive amounts of data. Had Bezos not opened the file, his data might still be safe.

    Use an iOS security app

    While iOS itself is pretty secure against malware, your iPhone isn’t immune to every threat. Hackers can collect your personal data over unsecured networks, and data breaches can leak your passwords on the dark web.

    Avast One for iOS fills the gaps that iOS can’t cover by running regular iphone malware scans and safeguarding your device with extra protection. Secure your iPhone against dangerous websites, data leaks, and more with Avast One.

    Can iPhones get viruses?

    Though rare, iPhones can get viruses and other malware, especially if the phone is jailbroken or if the victim is targeted in a high-value spear phishing attack. For normal iPhone users, a malware infection is an unlikely event. The iOS ecosystem is tightly controlled, and third-party apps need to be vetted and approved before they’re available on the App Store. This walled-garden approach makes it very difficult for your iPhone to get infected with malware.

    It’s much more likely that you may need to delete malware from your Mac, remove viruses from a PC, or get rid of malware from your Android phone.

    Of course, hackers are always working hard to improve their tools and techniques. While there may not be much malware on iPhones at the moment, that may change. It’s always good to have an iPhone antivirus tool on hand in case something slips through.

    Can iPhones get viruses from websites?

    Because of the unique architecture of iOS hardware and software, iPhones can’t get viruses from compromised websites. But that doesn’t mean they’re completely immune to malware. Before smartphones came along, malware was mostly a computer problem. Now that smartphone use is ubiquitous, hackers have been hard at work crafting all sorts of malware for mobile devices.

    iPhone malware and jailbreaking

    Jailbroken phones are at a much greater risk of malware infection than stock devices. When you jailbreak your iPhone, you bypass Apple’s built-in restrictions that otherwise prevent you from installing unapproved apps and making other changes.

    Some people prefer the enhanced freedom and flexibility of a jailbroken device. But because jailbreaking subverts your phone’s security measures, it leaves you vulnerable to data theft and malware infection. If you jailbreak your device, thoroughly vet any apps before installing them.

    What is an iPhone virus?

    A virus is a malicious bit of software designed to infect devices by spreading from one to another. iPhone viruses, which can be found on jailbroken devices, are no different — they hijack the resources of their host systems to replicate and propagate to other devices.

    Malware is a catch-all term for many types of malicious software, and viruses are one type of malware. Spyware, ransomware, and adware are also malware.

    Worms are another type of malware designed for mass infection, but there’s a key difference between worms and viruses: worms are self-sufficient while viruses rely on host software for replication. These days, hackers often pair malware with social engineering tricks to carry out their attacks.

    Unless it’s jailbroken, if your iPhone is acting strangely, it’s more likely caused by a wonky app than by malware. Before trying iPhone virus removal strategies, check your apps to make sure everything is working properly.

    Can my iPad get a virus?

    There are no known viruses on iPads. iPads run the same highly secured Apple operating system that powers iPhones, and there’s little risk of a virus getting through Apple’s ecosystem and infecting your iPad. But other forms of malware, such as spyware, have been known to affect iOS devices.

    If you do run into a problem with your iPad, the process of removing a virus from an iPad will be the same as cleaning viruses off an iPhone. So if you know how to cure your iPhone, you’ll also know how to clear viruses from your iPad.

    Where do iPhone viruses come from?

    If your iPhone is jailbroken and you download unvetted apps for outside Apple’s App Store or visit unsafe websites, your iPhone could get infected with a virus. Since jailbreaking an iPhone removes a lot of its anti-malware safeguards, you need to be extremely careful when it comes to sourcing your apps.

    Wi-Fi connections with weak security are another potential vulnerability, since hackers can intercept your traffic. Always use a VPN to protect your devices and personal data when you’re using public Wi-Fi networks.

    Avast One for iOS features a built-in VPN to protect your iPhone and encrypt your connection. A VPN protects your privacy on your iPhone.

    Avast One features a built-in VPN that encrypts all the traffic coming to and from your device, preventing hackers from snooping on your online activity, personal data, passwords, and credit card info. A VPN is the quickest and easiest way to turn an unsafe public Wi-Fi connection into a protected one.

    Other iPhone security risks

    Learning how to remove malware from your iPhone is just the first step toward proper iPhone safety. There are plenty more threats that can affect your iPhone or iPad.

    Phishing and pharming attacks

    Two of the internet’s most enduring threats are phishing and its large-scale cousin pharming. Phishing lures victims with “bait,” such as spoofed emails, that tricks victims into revealing their sensitive personal information. Pharming redirects web visitors to fraudulent websites where personal info can be harvested.

    With the popularity of smartphones, many phishers now target mobile devices with text messages instead of traditional emails, while seeding social media platforms with fake ads.

    Meanwhile, owners of fake websites have begun adopting higher-security HTTPS encryption for their scam sites, making them even harder to detect. HTTPS phishing has now become so prevalent that the FBI issued a warning in 2019 detailing the new threat.

    Webcam hacks

    Webcam security is another area of risk. Most laptops and mobile devices feature front-facing cameras, making them ripe targets for attacks. In early 2019, hackers exploited a security flaw in the macOS app for video conferencing platform Zoom to spy on users via webcams.

    Apple’s own FaceTime contained a bug that could allow someone to secretly access another’s microphone and camera, listening to them and watching them without consent. The bug has since been fixed.

    Give your iPhone an extra layer of protection

    Preparation is the most reliable defense against threats. Take a proactive step toward keeping cybercriminals and their tools out of your iPhone or iPad with Avast One for iOS.

    Avast One isn’t just a powerful antivirus. It also detects malicious websites in real time to prevent hackers from stealing your data or downloading and installing malware onto your phone. And the leak-monitoring feature notifies you immediately if any of your passwords have leaked, helping you keep your accounts secure.

    Get advanced threat-detection technology — secure your iPhone today with Avast One.

    Protect your iPhone against malware and other threats with Avast One


    Protect your Android against malware and other threats with Avast One

    Security Tips
    Ivan Belcic