How to Reset Raspberry Pi

We know that sometimes you just need a fresh start – but how do you do that with a Raspberry Pi? 

It is super simple to reset or wipe your Pi to take it back to its default settings. Some people prefer to call this process a ‘factory reset.’ Whatever term you use, follow these instructions to get your Pi back to square one.


If you use NOOBS, we think that the easiest way to reset your Pi is to launch the recovery system. Do this by holding down shift while you are rebooting your Pi.

Once you are in recovery mode you can choose to set your Pi back to ‘factory default.’ This means that your Pi will revert to how it was when you first started working on it.

This is a super-easy way and works well for a lot of Pi users. However, this method will not work if you are using a wireless keyboard. 

Instead of modifying your hardware setup, you can reflash the SD card.

How to Reset Raspberry Pi

Reflash SD Card

Reflashing your SD card is the alternative to a reset in recovery mode in NOOBS. 

The process involves unplugging the card, rewriting the image, and then plugging the card back in. This can be a time-consuming process that can get quite frustrating, especially if you are testing or are in development and need to reflash regularly.

Thankfully, there are some ready-to-use images available online. These images are going to be zipped so that they don’t take up too much data space to download but will need to be unzipped before you can use them.

Before you start, you need to perform a factory reset. Use the command: sudo su –   

/boot/factory_reset –reset    

  1. Find your preferred Raspberry Pi image and download it. 
  2. Unzip this file and add it to your files’ directory.
  3. Now you need to change your directory. Use this command to do it: cd /home/${USER}/RaspberryPi-Factory-Reset/files/   
  4. Now you need to make the code executable for your Pi. Use this command: sudo chmod +x ./  
  5. If you have done this correctly, you can now execute the script. Use the command: sudo ./  
  6. You can now copy the newly-created image and write it to the SD card. You can now eject the card from your computer and plug it into your Pi and you are good to go.

Do I Need to Reset My Raspberry Pi?

Some people think that resetting their Pi is the only option in some scenarios. This is not always correct. Some problems can easily be solved without restoring your Pi to its factory settings.

Frozen Raspberry Pi

If you think that your Pi is frozen, you do not need to wipe it to get it to work again. 

Instead, hold down CTRL and ALT and F1 on your keyboard. This allows you to move to a ‘back up’ terminal from the kernel. 

Now you can log in and get rid of whichever process failed and caused your Pi to freeze.

We recommend that you execute a reboot at this stage to check that your Pi can boot up normally again. The command for a reboot is: sudo reboot -r now

Forgotten Password

Forgotten your Pi’s password? Don’t worry – we’ve all been there! Thankfully you do not need to wipe everything from your Pi to gain access. 

Follow these steps to reset your password:

  1. Execute a proper shutdown of your Pi if possible, then remove the SD card.
  2. Plug the SD card into your computer and open the file on the SD card called cmdline.txt.
  3. Add init=/bin/sh to the end of the .txt document. This will make your Pi boot in single-user mode.
  4. Safely eject the SD card from your computer and plug it back into your Pi. Turn your Pi on.
  5. When prompted, use su to log in as a root user. Keep in mind that a password will no longer be needed.
  6. Now type passwd pi and follow all prompts to enter a new password – try to make this one more memorable!
  7. Execute a proper shutdown of your Pi and then remove the SD card (see also ‘How To Format A Raspberry Pi SD Card‘). Plug it back into your computer and open the cmdline.txt file again.
  8. Delete the init=/bin/sh that you added in step (3).
  9. Plug your SD card back into your Pi, switch it on, and log in with your new password.

Default Passwords

It may be an idea to try using the default password and username on Raspbian.

The default password is usually raspberry and the default username is pi, so these are well worth trying. 

Resetting Raspberry Pi 3

For some reason, the most frequently asked question about resetting a Pi is about the Raspberry Pi 3 in particular. It may be because this was the most popular of the Pi models or a model that gets the most use. Who knows? 

But that doesn’t matter. All that does matter is that the resetting procedures are the same for all Pi models. 

Frequently Asked Questions:

What Is The Difference Between Factory Reset, Restoring To Factory Settings Or Factory Default, And Wiping A Raspberry Pi?

All of these terms mean the same thing. You are erasing all the data stored on your Pi, so it will be like it was when you first began using it. It will be like it was fresh from the factory, hence the phrase factory settings. Factory default is sometimes used as no personalizations or changes that you have made will be saved.

What Is An Image?

In the world of computers and Raspberry Pi, an image is a term given to a file that has your executables, the OS, and any other data files that are related to the programs that you use on your Pi and sometimes used for resetting. 
You need to reinstall an image when you reset your Pi and SD card so that your operating system can run. If you are a Pi newbie, this is likely to be NOOBS or Raspbian. 

buy raspberry gear

Final Thoughts

We all need a chance to start afresh with a clean slate sometimes. Your Raspberry Pi is no different. 

You can reset from recovery mode with NOOBS. Hold down shift while your Pi boots up and then choose the factory default option.

This will not work if you have a wireless keyboard or if you don’t use NOOBS as an OS. If this is you then you need to go the long way round and reflash your SD card.

This can be a time-consuming process, but you can always use one of the many freely available images online. 

Before you reset, think about why you are resetting. If you have forgotten your password then you can easily reset it without the need to lose all of your hard work.

Erik D