Remove nextcloud entirely from server

Did a lot of crap with it, can I somehow remove it with ALL of the stuff it created to then do it fresh again? I would like to avoid formatting the disk. I followed the Nixos manual for the setup

rm -rf /var/lib/nextcloud will remove all of the NextCloud state AFAIK, you also need sudo -u postgres dropdb nextcloud if your local database for NextCloud is using PostgreSQL and is named nextcloud.


Further to the comments made by others, there is virtually no scenario where “formatting the disk” is necessary to undo software configuration choices.

For anything that results in a new generation, you can always just go back to an earlier one.

Any kind of stateful data is typically stored under /var and if someplace else, you will be able to easily find out where that is and then delete that.

1 Like