What erasing your computer means and when to do it

Erasing your computer means removing all the files, programs, and settings you've added since you got it, then reinstalling the operating system from scratch. The result is a machine that works like it did the day it left the factory. This is different from deleting individual files or emptying your trash — it wipes the entire hard drive.

You might erase your computer before selling it, giving it away, or donating it so the next person doesn't inherit your passwords, photos, or financial records. You might also erase it if your machine has slowed to a crawl, if a virus won't go away, or if you straightforward want a clean slate after years of installing and uninstalling programs.

The process takes between 30 minutes and two hours depending on your computer's speed and how much data is on it. You'll need your Windows or Mac installation media (or the ability to read it), and you should back up any files you want to keep before you start.

Key Takeaways

  • Back up all files you want to keep before you begin, because erasing removes everything on the hard drive permanently.
  • On Windows, use Settings > System > Recovery > Reset this PC, or create installation media and boot from it for a deeper erase.
  • On Mac, restart in Recovery Mode (Command + R), use Disk Utility to erase the drive, then reinstall macOS from the same menu.
  • After erasing, your computer will restart and ask you to set up Windows or macOS as if it were brand new, including creating a user account and password.
  • The erase process is permanent and cannot be undone, so triple-check that you have backed up anything you need before starting.

Back up your files before you erase

Before you do anything else, copy every file you want to keep to an external hard drive, USB flash drive, or cloud storage service like OneDrive, Google Drive, or iCloud. This includes documents, photos, videos, music, and any other personal files. Once you erase your computer, these files are gone for good.

On Windows, plug in an external drive, open File Explorer, and drag your Documents, Pictures, Downloads, and Desktop folders to the external drive. On Mac, open Finder, click on your external drive in the sidebar, then drag the same folders there. If you use cloud storage, sign in to your account on the computer and make sure all your important files have synced to the cloud before you proceed.

If you have programs you paid for and need to reinstall later — like Microsoft Office or Adobe Creative Suite — write down the product keys or email addresses associated with those accounts. You'll need them to reinstall after the erase is complete.

How to erase a Windows computer

Windows offers two ways to erase your computer. The first is faster and works if your computer still starts up normally. The second is more thorough and works even if Windows won't start.

For the quick method: Click the Start button, then go to Settings > System > Recovery. Click "Reset this PC" and choose "Remove everything." Windows will ask whether you want to remove files only or remove files and clean the drive. Choose "Remove files and clean the drive" if you're selling or giving away the computer — this makes it much harder for someone to recover your data. If you're keeping the computer, "Remove files only" is faster. Windows will restart several times and take 20 to 60 minutes to finish.

For the thorough method: You'll need Windows installation media — either a USB drive or DVD with Windows on it. If you don't have one, go to microsoft.com/software-read/windows on another computer, read the Windows installation tool, and create a bootable USB drive following Microsoft's instructions. Plug the USB drive into the computer you want to erase, restart it, and press F12, F2, Delete, or Esc during startup (the key varies by computer brand — watch for a message on the screen). Select the USB drive from the boot menu, then follow the Windows Setup wizard. When it asks where to install Windows, click "Drive options (advanced)" and delete all partitions on the main drive, then install Windows on the empty space. This method takes 30 to 90 minutes.

How to erase a Mac computer

Erasing a Mac requires you to restart in Recovery Mode, erase the drive using Disk Utility, and then reinstall macOS. The whole process takes 45 minutes to two hours.

Shut down your Mac completely. Turn it back on and when ready hold Command + R until you see the Apple logo or a spinning globe. This boots your Mac into Recovery Mode. Once you see the macOS Utilities window, click "Disk Utility" and then click "Continue."

In Disk Utility, click on the drive name in the left sidebar (usually "Macintosh HD" or similar), then click the "Erase" button at the top. A dialog box will appear asking for a name for the drive and a format. Leave the format as "APFS" (or "Mac OS Extended" if your Mac is older than 2017), give the drive a name if you want, and click "Erase." Disk Utility will warn you that this cannot be undone — click "Erase" again to confirm. This takes 5 to 15 minutes.

Once the erase is complete, close Disk Utility and you'll return to the macOS Utilities window. Click "Reinstall macOS" and follow the on-screen instructions. Your Mac will read and install the operating system, which takes 30 to 90 minutes depending on your internet speed. Your Mac will restart several times during this process.

What happens after your computer is erased

When the erase and reinstall are complete, your computer will restart and show you the setup screen for a brand new machine. On Windows, you'll see the "Hi there" welcome screen. On Mac, you'll see the "Welcome" video. Both will ask you to choose your language, connect to Wi-Fi, and create a user account with a password.

Take your time with the setup. Choose a strong password — at least 12 characters mixing uppercase, lowercase, numbers, and symbols. Write it down somewhere safe or use a password manager. You'll need this password every time you turn on the computer or wake it from sleep.

After setup is complete, your computer is ready to use. You can now reinstall the programs you need, sign into your email and cloud storage accounts, and restore your backed-up files from your external drive or cloud service.

Common mistakes to avoid

The biggest mistake is erasing your computer without backing up your files first. Once the erase starts, your data is gone. There is no undo button and no recovery option. If you realize mid-erase that you forgot something important, stop when ready and do not restart the computer — contact a data recovery service, though recovery is expensive and not always possible.

Another common mistake is losing track of your product keys or account information for paid software. Before you erase, open each program you paid for and look for the product key in the Help menu or Account settings. Take a screenshot or write it down. After you erase and reinstall, you'll need these keys to prove you own the software.

On Windows, don't unplug the power cable or force-restart the computer during the erase process, even if it seems frozen. The reset can take a long time and appear to be stuck. Let it run for at least an hour before you assume something went wrong. On Mac, don't force-restart during the macOS reinstall — the read can take 30 to 90 minutes on a slow internet connection.

When to take your computer to a professional

If your computer won't start up at all, or if you see error messages during the erase process, you may need help from a technician. A local computer repair shop can erase your machine for you, usually for $50 to $150. This is worth the cost if you're not comfortable doing it yourself or if your computer has hardware problems that prevent a normal erase.

If you're erasing the computer because of a virus or malware infection, a professional can confirm the infection is gone before you reinstall your files. Some viruses hide in ways that are hard to detect, and reinstalling your backed-up files could reinfect your computer if the backup itself was compromised.

Frequently Asked Questions

Can I erase my computer if I don't have the Windows or Mac installation media?

Yes. On Windows, you can use the built-in reset tool in Settings without installation media. On Mac, Recovery Mode is built into the computer, so you don't need a separate installation disk. Both methods will read the operating system during the process if needed. You do need a working internet connection.

Will erasing my computer remove the hard drive completely?

Erasing removes all your files and reinstalls the operating system, but the hard drive itself remains in the computer. If you want to physically remove the hard drive before selling the computer, you can, but erasing it first is the standard approach. For maximum security before selling, choose the "clean the drive" option on Windows, which makes data recovery much harder.

How long does it take to erase a computer?

The process usually takes 30 minutes to two hours. Backing up your files beforehand can add another 30 minutes to several hours depending on how much data you have. The actual erase and reinstall typically takes 45 minutes to 90 minutes, but this varies based on your computer's speed and internet connection.

What if I change my mind after I start erasing?

If you stop the process before it completes, your computer may not start up properly. If you realize you made a mistake very early in the process, force-restart the computer when ready by holding the power button for 10 seconds. If the erase has progressed further, you may need to contact a data recovery service, which is expensive. This is why backing up first is so important.

Do I need to erase my computer before recycling it?

Yes, absolutely. Before you recycle, donate, or sell your computer, erase it completely. This removes your passwords, financial information, photos, and any other personal data. Even if you delete files normally, they can sometimes be recovered from the hard drive. A full erase makes recovery much harder and protects your privacy.