A factory reset erases everything on your device and returns it to the state it left the factory

A factory reset wipes all your personal data — photos, messages, apps, passwords, browsing history, files — and removes any changes you made to settings. It reinstalls the original operating system that came with the device. When it finishes, your phone or computer looks and behaves exactly as it did the day you unboxed it, except the operating system may have security updates applied.

The reset does not remove malware that lives in the device's firmware (the lowest layer of software, below the operating system). It does not erase data from cloud accounts linked to your device — those stay in Google Drive, iCloud, OneDrive, or wherever you stored them. And it does not delete information that companies already collected about you before the reset happened.

Most people use a factory reset for three reasons: to sell or give away a device, to fix serious software problems, or to remove malware they cannot clean any other way. Each reason has different steps and different things to know first.

Key Takeaways

  • A factory reset deletes all files, apps, and settings on your device but does not touch data stored in cloud accounts or information already collected by companies.
  • Before you reset, back up anything you want to keep — photos, documents, contacts — because the reset will erase them permanently from the device.
  • On Android, a factory reset does not always remove a Google account that was signed in, which can lock you out of your own device after the reset completes.
  • If you are selling or giving away the device, a factory reset alone may not be enough — you should also remove your accounts and sign out of services before handing it over.
  • A factory reset cannot remove malware hidden in firmware, so if you suspect a serious infection, contact the device manufacturer or a security professional before resetting.

What gets erased and what stays behind

A factory reset removes everything you added to the device after you first turned it on. That includes all your files, photos, videos, documents, installed apps, browser bookmarks, saved passwords, text messages, call history, and any custom settings you changed. The device returns to its original wallpaper, default apps, and factory settings.

What does not get erased: anything stored in a cloud account. If you use Google Photos, OneDrive, iCloud, Dropbox, or any other cloud service, those files stay in the cloud. If you signed into Gmail, Outlook, or another email account on the device, the account itself stays in that company's system — the reset only removes it from this particular device. The same is true for social media accounts, banking apps, and any other online service.

Data already collected by companies also stays with them. If Google tracked your location history before the reset, that history remains in your Google account. If your phone carrier logged your call records, those records stay in their system. A factory reset does not reach into external servers or undo past data collection — it only clears what is stored locally on the device itself.

Backing up before you reset

Before you start a factory reset, back up anything you want to keep. The reset is permanent and fast — once it starts, you cannot stop it and recover files afterward. Most devices offer built-in backup tools that make this straightforward.

On iPhone and iPad, use iCloud backup: go to Settings, tap your name, select iCloud, then tap iCloud Backup and choose Back Up Now. Or connect to a computer with iTunes or Finder and create a local backup. On Android, go to Settings, search for "backup," and turn on Google One backup (or Samsung Cloud if you own a Samsung device). This backs up your contacts, calendar, app data, and some settings — but not all files. For photos and documents, use Google Photos or another cloud service.

On Windows, use File History or System Image backup. On Mac, use Time Machine. Both are built in and can back up to an external drive or network storage. If you use a cloud service like OneDrive or iCloud Drive, make sure important files are synced there first.

After backup is complete, write down any information you might need after the reset: WiFi passwords, important account usernames, two-factor authentication recovery codes, and any settings you customized. You will need to re-enter these by hand.

How to perform a factory reset on each device type

On iPhone or iPad: Go to Settings, tap General, scroll to the bottom, tap Transfer or Reset, then tap Erase All Content and Settings. You will be asked for your Apple ID password and, if you use it, your Screen Time passcode. The device will erase everything and restart. This takes 5 to 15 minutes.

On Android: Go to Settings, search for "reset" or "factory reset," and look for an option called Reset Phone, Erase All Data, or Factory Reset (the exact name varies by manufacturer). You will be asked for your PIN or password. The device will erase everything and restart. This takes 5 to 15 minutes. After the reset, you may be asked to sign back into your Google account — this is normal and required to use the device.

On Windows: Go to Settings, select System, then Recovery. Click Reset This PC and choose either Keep My Files (removes apps and settings but keeps personal files) or Remove Everything (full factory reset). You will need your Windows password. The process takes 20 to 60 minutes depending on how much data is on the device.

On Mac: Restart the device and hold Command + R to enter Recovery Mode. From the Utilities menu, select Erase Mac. Choose your startup disk and the format (APFS for newer Macs, Mac OS Extended for older ones). Click Erase. After erasing, you can reinstall macOS. This takes 30 to 90 minutes.

The Google account lock on Android devices

Android has a security feature called Factory Reset Protection that can lock you out of your own device after a reset. If you signed into a Google account on the device before the reset, Android requires you to sign back into that same Google account after the reset completes. If you forget the password or no longer have access to that email address, you cannot use the device.

To avoid this: before you reset, go to Settings, search for "accounts," and remove your Google account from the device. Sign out of any other accounts you do not want to be asked about after the reset. Then perform the factory reset. When the device restarts, you can set it up fresh with a new account or skip account setup entirely.

If you are giving the device to someone else, remove your account before handing it over. If you already reset the device and are now locked out, you will need to contact Google with proof of ownership, or contact the device manufacturer's support line.

Preparing a device for sale or handoff

If you are selling or giving away the device, a factory reset is necessary but not sufficient. After the reset, take these additional steps:

  1. Remove your Google account (Android) or Apple ID (iPhone) before handing over the device, or the new owner will be locked out during setup.
  2. Sign out of email, social media, banking, and any other accounts on the device before the reset.
  3. Remove any SIM card or eSIM profile if the device is a phone.
  4. Disable Find My iPhone (on iPhone) or Find My Mobile (on Samsung) before the reset, or the new owner will not be able to set up the device.
  5. Take a photo of the device's serial number or IMEI (for phones) in case you need to report it lost or stolen later.

After the reset completes and you have removed your accounts, the device is ready to hand over. The new owner will see a setup screen and can create their own account from there.

When a factory reset is not enough

A factory reset cannot remove malware that lives in the device's firmware — the code that runs before the operating system even loads. This is rare, but if you suspect a serious infection (unusual battery drain, unexpected data charges, strange pop-ups that appear even in safe mode, or messages from your bank about suspicious activity), a factory reset alone may not fix it.

In that case, contact the device manufacturer's support line or a local repair shop. They can check the firmware and, if needed, reflash it — a process that requires special tools and replaces the firmware with a clean version from the manufacturer. This is more thorough than a factory reset but also more time-consuming and sometimes costs money.

If you suspect your accounts have been compromised (not just the device), change your passwords on a different device after the reset. Use a strong, unique password for each account, and enable two-factor authentication where available.

Frequently Asked Questions

Can I undo a factory reset?

No. A factory reset is permanent. Once it completes, the data is gone from the device. If you backed up to iCloud, Google Drive, or another cloud service before the reset, you can restore from that backup after the reset finishes. Otherwise, the data cannot be recovered.

Will a factory reset remove viruses or malware?

A factory reset removes most malware because it deletes the infected apps and files. However, it cannot remove malware hidden in the device's firmware. If you suspect a serious infection, contact the manufacturer or a security professional before resetting.

Do I need to factory reset before selling my phone?

Yes. A factory reset is the first step, but you should also remove your Google account (Android) or Apple ID (iPhone) and sign out of all other accounts before handing the device over. Without these steps, the new owner may be locked out during setup.

What happens to my photos and messages after a factory reset?

They are deleted from the device. If you backed up to Google Photos, iCloud Photos, or another cloud service before the reset, you can read them again after the reset. If you did not back up, they are permanently gone from the device.

How long does a factory reset take?

Most phones take 5 to 15 minutes. Computers take longer — Windows usually takes 20 to 60 minutes, and Mac takes 30 to 90 minutes. The time depends on how much data is on the device and how fast the storage is. Do not turn off the device while the reset is running.