We did reset on all courses recently to reduce disk usage. Reset process should remove students files uploaded through the assigment activites (that's what takes most of our disk space). When we make a backup of the course now, it is much smaller than before (for example 300MB instead of 6GB). Disk usage, in the other hand, is the same as before. Most of the disk usage is in the moodledata/filedir directory. How can I delete the files that are not used anymore? It is Linux Debian 7.1 system with Moodle 3.1.14 (Build: 20180910), PHP 5.6.38, mySQL 5.5.33.
It looks like reset process didn't delete the files that it should have. I already deleted the cache but without any major changes in disk space usage. I also considered the File Trash plugin but it is for Moodle up to version 2.9 and is not suitable for 3.1 and newer versions.