Installing software does not affect the state of the Pi. All the state is held on the SD card. To re-install Debian you need to write a fresh image to the SD card (or just insert an SD card with a different image).

Only top voted, non community-wiki answers of a minimum length are eligible