Reset/reinstall

Is there a way to get a dietpi install to reset or got to a LKG? I have a unit I want to reset to the ‘factory install’ and was looking for a way to do this outside of reimaging the SD and running the setup again.

I have a backup of a fresh and clean installation for this case.
If you don’t have one, there is another way (besides flashign new) described in this thread It’s mentioned to just run the prep script, but:

the script:

bash -c "$(curl -sSL https://raw.githubusercontent.com/MichaIng/DietPi/master/PREP_SYSTEM_FOR_DIETPI.sh)"

The script moved to a new location on the repo:

bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/MichaIng/DietPi/master/.build/images/dietpi-installer')"

Also have a look into the docs about it: Supported hardware - DietPi.com Docs

Thanks all will try the prep script.

I would recommend using dietpi-software to uninstall all software title before running DietPi installer. This should remove custom configs as well.