nextcloud uninstall failed

I uninstalled nextcloud but the process was hungup. Now when I try install again nextcloud it say me that is already installed.
If I try uninstall it see this message:

 Mode: Uninstalling Nextcloud: File sync, sharing and collaboration platform

ERROR 1396 (HY000) at line 1: Operation DROP USER failed for 'oc_admin'@'localhost'
mysqladmin: DROP DATABASE nextcloud failed;
error: 'Can't drop database 'nextcloud'; database doesn't exist'

I created the user ac_admin and nextcloud database to do work the uninstall proccess, but again hungup and return to start point.

How I can reinstall again nextcloud?


to purge the entire installation and remove all data, you could do following

G_AGP mariadb-server 
rm -Rf /var/www/nextcloud /mnt/dietpi_userdata/nextcloud_data 
rm -Rf /{mnt/dietpi_userdata,var/lib,var/log,etc}/mysql 
sed -i '/aSOFTWARE_INSTALL_STATE\[88\]/c\aSOFTWARE_INSTALL_STATE\[88\]=0' /boot/dietpi/.installed 
sed -i '/aSOFTWARE_INSTALL_STATE\[114\]/c\aSOFTWARE_INSTALL_STATE\[114\]=0' /boot/dietpi/.installed

NC can be installed using dietpi-software again

Hi, I got this output:

dietpi@DietPi:~$ sudo G_AGP mariadb-server
sudo: G_AGP: command not found

Can you try running this as user root pls

Thanks Joulinar!


I had this same issue unfortunately I had to d a fresh install. What server are you using and are you initiating multiple servers such as Nginx mariadb and Nginx SQLite? or apache.

I found it is best to install software packages 1 at a time so you can configure them. if you are switching sevral servers on at once it could cause conflicts. Many of the packages are Git repos that are constantly being worked on so dependencies change.

Check you services and check if MariaDB is failed. If it is go try uninstalling things that depend on it to see if it fires back up after a reboot. This will help you pinpoint the issue. It might be less time consuming to do a fresh install though?