Nextcloud directory (/var/www/html/) very large - is this normal?

Hello NC experts!

I had Nextcloud running on a Raspberry 4 (on a 64 GB SD card), and for the past couple of months this went very well. Today, the sync failed for a large file; the sync error was something like: “required space for saving synced file exceeds available disk space”. I checked and noticed that my 64 GB SD card was indeed nearly full. Apparently my /var/www/html/nextcloud folder grew to over 50 GB, although my data-to-be-synced is only about 5 GB. I managed to reduce the size of /var/www/html/nextcloud by “permanently” deleting the “deleted files” from the trash bin, using the web interface. This freed some 20-30 GB of data. However, the /var/www/html/nextcloud directory is still rather large (about 20 GB). Is this normal, given that my synced data is only about 5 GB? Syncing now seems to work fine, again.

Thanks for your help and comments!

Yes.

  • the “synced data” is only one part of the used data
  • the trash bin one other part (which you solved)
  • the versions is a third potentially big bunch of data, which you can → cleanup with occ ←

and last but not least

  • the previews of your images, located in data/appdata_@instanceid@/preview

you can easily analyze the exact disc usage with the ncurses version of du:

  • ncdu (sudo apt-get install ncdu)

simply run it this way:

user@box:~$ ncdu /var/www/html

Much and good luck,
ernolf

Thank you, Ernolf.
In particular, your comment regarding the occ:cleanup command was helpful. I figured out a way of using it. The following worked for me (on Raspberry Pi OS, Nextcloud installed from command line, i.e., not NextcloudPi):

sudo -u www-data php /var/www/html/nextcloud/occ versions:cleanup

This seemed to have deleted the ‘versions’ of my sole user and reduced the size of my /var/www/html/nextcloud directory to now 13 GB. Great!
Thanks again!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.