There are many reasons why you’d like to disable an app from the server terminal, such as when an app upgrade went wrong and NextCloud is stuck in the process.
Once logged with SSH to your server, do the following :
1. Go to your NextCloud installation folder :
cd /path/to/nextcloud
Optional : If you don’t know the exact app name, execute the following command to list them all and find out :
sudo -u www-data php occ app:list
2. Execute this command with the application name to disable it :
sudo -u www-data php occ app:disable <app_name>