Occ trashbin:cleanup --all-users does not empty group folders

Nextcloud version (eg, 20.0.5): Nextcloud 20.0.6
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.10
PHP version (eg, 7.4): 7.4.12

The issue you are facing:

the tashbin:cleanup leaves trash under the “/__groupfolders/” untouched (it does not delete these files

wow this is still an issue!
un-be-li-bubble

sudo -u www-data php occ trashbin:cleanup --all-users
will not wipe the GF files out

let’s pray borders and smiters

Groupfolders has its own command available afaik: GitHub - nextcloud/groupfolders: 📁👩‍👩‍👧‍👦 Admin-configured folders shared by everyone in a group. https://github.com/nextcloud-releases/groupfolders

Yes. And that is because it is designed that way.

To empty groupfolder-trashbin, you must use

  • sudo -u www-data php occ groupfolders:trashbin:cleanup <folder_id>

Here the help screen:

~# sudo -u www-data php occ groupfolders:trashbin:cleanup --help
Description:
  Empty the groupfolder trashbin

Usage:
  groupfolders:trashbin:cleanup [options] [--] [<folder_id>]

Arguments:
  folder_id              Id of the groupfolder

Options:
  -f, --force            Skip confirmation
      --output[=OUTPUT]  Output format (plain, json or json_pretty, default is plain) [default: "plain"]
  -h, --help             Display help for the given command. When no command is given display help for the list command
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi|--no-ansi   Force (or disable --no-ansi) ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --no-warnings      Skip global warnings, show command output only
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

and to get the <folder_id>, you have to use

  • sudo -u www-data php occ groupfolders:list

Much and good luck,
ernolf

thanks @ernolf !
yes!! I finally met that command and spread it all around. Have you seen how many groups get error messages when trying to empty their bins?

But only one command to empty the group folder, do you think it’s meant that way: Teams that can’t access the server with CLI should never be able to empty their bins? :thinking:

Adding a flush button in the admin panel could be a great solution for GroupFolder users! :tada:

enjoy your day