When you uninstall an app from the ZimaOS App Store, containers are removed but the AppData folder is intentionally kept. That’s why reinstalling Nextcloud keeps pulling back the old config and why Portainer doesn’t fully solve it.
Also important: AppData is owned by root, not the UI user, so it can’t be deleted from the normal file manager or by most apps.
To fully remove Nextcloud and start fresh, you need to remove both parts:
Uninstall Nextcloud from the ZimaOS App Store (this removes the containers)
Manually delete the Nextcloud AppData folder from the system side (not Portainer)
Once the AppData folder is gone, a reinstall will behave like a first-time install.
This is by design in ZimaOS to protect user data, but it does mean “clean reinstall” requires deleting AppData manually.