Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can.
The Basics
Nextcloud Server version (e.g., 29.x.x):
Not sure but I think it was 32.0.0 (current install not working)
Operating system and version (e.g., Ubuntu 24.04):
Ubuntu 24.04.3 LTS
Web server and version (e.g, Apache 2.4.25):
Apache 2
PHP version (e.g, 8.3):
8.3.30
Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Bare Metal: install on Ubuntu by command line i.e. Apache, the MySQL then Nextcloud
Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
How do I uninstall Nextcloud so I can reinstall it and hopefully solve my issue with it?
Apache seems to be working, my guess is MYSQL is working, so I’d like to reinstall Nextcloud hence my need to uninstall it. The following is how I installed it:
Create a data directory for your Nextcloud installation, ensure appropriate permissions are applied and edit the Nextcloud configuration files: mkdir -p /var/www/nextcloud/data chown -R www-data:www-data /var/www/nextcloud/ chmod 750 /var/www/nextcloud/data
To deal with the .htaccess file (allows configurations at the directory and subdirectory level) for Nextcloud, create a new configuration file for Apache: nano /etc/apache2/sites-available/nextcloud.conf
Paste the following into the empty file: Alias /nextcloud “/var/www/nextcloud/”
Simpler said than done. Despite 30 years in IT support, I’m an old git (retired) and I don’t really get Linux. Don’t get me wrong, I can use it, I can build it (I have a couple of Linux boxes right now inc. the Mini-PC I’m currently having issues which runs my NAS, media server and once ran Nextcloud) but I don’t really understand it. I document everything so I can rebuild it all but these things go wrong (the reason I’m asking these questions) and I just don’t know how to fix them.
In Windows, although there might be some leftovers or dependencies, I can typically just uninstall something, reinstall it and I’m away again and sure, that’s partially down to expertise/familiarity which is probably where I’m failing here.
I’ve looked at the link you provided and I’m pretty much left just scratching my head so, since I can’t find an easy way to uninstall, I’m probably gonna have to rebuild the entire server.
It also depends on your infrastructure (bare metal or VM-based) and whether you still need the data from the database.
If the database contents don’t really matter anymore and you mainly want to recover the files, you could simply set up a fresh instance and copy the files back. If you still need the database, you can of course back it up and restore it as well. However, if the database itself is causing the problems, that won’t necessarly help either.
As for the infrastructure side of things: if you’re running Nextcloud inside a VM, you could spin up a second VM with a fresh Nextcloud instance and migrate the data once everything is working properly.
Or you could take snapshots of the VM and actually try to understand what’s causing your issues and tackle them accordingly. If something goes wrong, you can simply revert within seconds. If you simply reinstall Nextcloud without understanding what caused the problems in the first place, and then use a similar configuration that may contain the same missing, misconfigured, or unoptimized settings, there’s a good chance you’ll just end up with the same issues again.
The third option would be to stop maintaining a full LAMP stack manually yourself and use Nextcloud AIO instead. That takes care of most of the configuration and maintenance work for you.
But you could also take that as a hint to maybe consider using VMs. Obviously, it’s another thing you first need to become familiar with, but once you do, it comes with several advantages, snapshots being one of them.
Snapshots have saved my butt a few times when something went wrong during a Nextcloud update, OS update, database update, PHP update, etc.