Iām petty sure thatās due to metadata, most importantly preview files which are stored inside the data dir as well. So you have many pictures beneath your actual Nextcloud data?
The uploads folder contain the parts of uploaded files. I have seen folders where there has been a lot of junk left behind, probably mostly from unseccessful uploads. Itās safe to empty the folder - as long as the resp. client is not uploading at the moment.
Regarding the files_versions folder - this one keeps the versions of the modified documents of your data folder. Better use the NC web client to remove those. Just go to you base folder and head over to the lower left trash bin. Click on it and have it show you your deleted files - there you can also finally remove these files and gain back the occupied space.
Thank you. Do you mean the config.php at /var/snap/nextcloud/current/nextcloud/config? There is also an autoconfig.php. Couldnāt find the parameter āāversions_retention_obligationā => āautoā,ā do I just add it to the config?
The uploads dir can be cleared safely but the versions dir not, otherwise the database would have left obsolete entries. Clear file versions from Nextcloud UI and set the versions retention option to keep only as much versions as needed.
Jep the option needs to be added to the config.php, itās not present by default.
If you root if full you probably will not be able to install something else, just try to find out what is the biggest folder and why. This is similar to ncdu, but should be possible with existing tools:
du -a / | sort -n -r | head -n 20
535092 /usr/bin
102540 /usr/bin/dockerd
87132 /usr/bin/docker
47952 /usr/bin/containerd
...
or for a human friendly output:
du -ah / | sort -h -r | head -n 20
523M /usr/bin
101M /usr/bin/dockerd
86M /usr/bin/docker
47M /usr/bin/containerd