How to reduce OC_Activitiy table

Running with MySQL. After a couple of months, the database table oc_activity gets quite big, 3.3GB. Is there any way to reduce the size of this? or it will keep growing?

Add a line in /config/config.php:

'activity_expire_days' => 365,

365 is the default value. Set it to 90 or less.

1 Like


after i change value in config file “‘activity_expire_days’ => 100,” my file size is still big. I wait 15 hours but nothing change , is it anyway how to make some manual cleanup of this file? I have very low storage because of it.

du -hs /var/lib/mysql/nextcloud/* | sort -rh | head -1
11G /var/lib/mysql/nextcloud/oc_activity.ibd

free space in /var is now only 150MB …

My NC is old and have new on new server already running but before shutdown old one i need give users some days to migrate data. That’s why i need to fix this :frowning: