Is it safe to dele folders of removed apps from the appdata_ folder?

Hi there,

Is it safe to delete folders from the data/appdata_<instance_id>/<removed_app>/ folder for previously removed apps?

For example, I was using the backup app but I have just removed it from my instance. I would assume the respective folder within the appdata_<instance_id>/ folder would be automatically removed, but it was not. So now I have a huge folder with no use.

Would it be safe to just delete the folder? Or is it already automatically done via a cron job?

Here is my instance configuration:
Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 7.4.28

Thank you for your attention.

better use an occ command.

cd /var/www/.. ../netcloud/

sudo -u www-data php occ list for all the command.

  1. First disable the app

sudo -u www-data php occapp:disable appname

  1. Then Remove the app

sudo -u www-data php occapp:remove appname

Thanks for your reply!

The app was already removed from the instance, but using the web interface.

Does using occ app:remove appname do something different, e.g. also removing the appdata folder for that app?

at least, it does it clean…

What do you mean by ‘does it clean’? Does the occ command remove the appdata folder for that app?

yes…only if it is not a shipped app ( original-native app )

But here the app was already removed. So using the occ command would not be an option anyway.

Perhaps you can use occ to install the app again and then uninstall again.

Ok, so I did as suggested.

I have reinstalled and reactivated the backup app, then used the command occ app:remove backup to remove it. The behavior was the same as before, when I removed the app using the web interface, i.e. the app was removed, but the respective data/appdata_<instance_id>/backup/ folder was not deleted.

So how should I proceed?
Is it safe to manually delete that huge folder, i.e. rm -rf data/appdata_<instance_id>/backup/?