Disk space discrepancy

Hi all,

I have a question: My files are currently around 8 GB but when I check on the server it says that I use 23 GB. Here is what tree came up with:

Filesystem Size Used Avail Use% Mounted on
udev 488M 0 488M 0% /dev
tmpfs 100M 11M 89M 11% /run
/dev/vda1 25G 23G 1.9G 93% /
tmpfs 497M 0 497M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 497M 0 497M 0% /sys/fs/cgroup
/dev/vda15 105M 3.6M 101M 4% /boot/efi
/dev/loop1 218M 218M 0 100% /snap/nextcloud/16402
/dev/loop3 90M 90M 0 100% /snap/core/7917
/dev/loop2 212M 212M 0 100% /snap/nextcloud/16739
/dev/loop4 90M 90M 0 100% /snap/core/8039
tmpfs 100M 0 100M 0% /run/user/0

So it looks like the /dev/vda1 folder is using 23 GB. Is that so? Can someone explain this for me?

Thank you

PS. Sorry if this was asked before but I couldn’t find anything

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?

No. Not really. But I have another question can I just delete everything in the files_versions folder? And what is the uploads folder exactly?

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.

Great. Thank you!

You can also adjust your config, so that not too many version will be saved, or automatically cleanup after X Days:


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.

1 Like

Yes, for snap you have to use snap set command:

Yes, as e.g. 'versions_retention_obligation' => 'auto, 90',