Files still left on disk after groupfolders trash emptied

Nextcloud version (eg, 20.0.5): 18.0.14
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.2
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.4.3

I let our NextCloud instance get a little behind in versions (it was running perfectly so I didn’t touch it) and now I’m trying to fix that. First I found that groupfolders wasn’t honoring the systemwide trash lifetime setting (okay so it wasn’t running perfectly). There are files from 2+ years ago in there, oops. So I started manually removing them then because there isn’t an easy way to multiselect or sort by date in the GUI I issued a webdav PROPFID command, got all the file information and then have issues multiple webdav DELETE commands to remove those files.

Right now that is still going on but it has progressed past files older than 365 days. When I look in the GUI it confirms this. However when I go on the filesystem and do a find /mnt/ncdata/__groupfolders/trash//trash/ -type f -mtime +365 -print | wc -l it is showing 10917 files still there.

If they aren’t known about by Nextcloud can I just delete them (well move them to a temporary location first and then delete after XX days)? If I do delete them is there an occ command that I need to fun to rescan the groupfolders trash?

Hi, did you see GitHub - nextcloud/groupfolders: 📁👩‍👩‍👧‍👦 Admin-configured folders shared by everyone in a group. ?

Yes I’m familiar with that page. My question is does the groupfolder:scan command pay attention to the trash folder?

Great! My question is if you’ve seen this command occ groupfolders:trashbin:cleanup?
That’s the command that you should be using when deleting a large amount of files in the trashbin.

From my understanding though occ groupfolders:trashbin:cleanup will remove everything from the trash. I only want to delete items over 180days.

For this feature see Take trashbin retention policy into account · Issue #930 · nextcloud/groupfolders · GitHub

Yep, tracking that issue. I’m doing a manual cleanup until that get’s implemented. What I’ve noticed though is issuing a PROPFIND through webdav and getting a list of files in groupfolders trash is that there are more files LOCALLY then listed in the database. So I want to make sure filesystem and database are in sync.

Then you could try to rescan the groupfolder with the groupfolder:scan command. But I don’t know if it will work.