How to make the File Retention app delete files permanently?

Hi everyone,

I need some help with my automated backup cleanup process. My goal is to keep only the most recent Signal backup on my Nextcloud and have older versions deleted permanently to save space.

My current setup:

  • System: Nextcloud AIO (stable) on a Debian 13 server.
  • Step 1: Upload
    My phone automatically uploads new Signal backup files to a dedicated folder in Nextcloud.
  • Step 2: Tagging with a Flow
    I have a Flow configured that watches this folder. As soon as a new backup file is uploaded, the Flow automatically applies a specific tag to it, for example, “delete-soon”.
  • Step 3: Deletion with the File Retention app
    I am using the File Retention app (Automated tagging) to handle the deletion. I’ve created a rule that deletes any file with the “delete-soon” tag after it is a few days old.

The Problem:
This workflow successfully removes the old files from their original folder. However, the File Retention app only moves them to the trash bin instead of deleting them permanently. As a result, my trash bin is now filled with over 100 GB of old backups, which defeats the purpose of the cleanup.

My Question:
Is there a setting within the File Retention app that I am missing to force a permanent deletion? Or is my overall approach of combining a Flow for tagging with the Retention app for deleting not the best way to achieve this?

Thanks!

Using the trash bin is a normal process in Nextcloud. However, you can customise the trash bin. But I don’t think you can bypass the trash bin.

documentation trash bin

Hmm… I have to be quite conservative with my space as I am running my instance on just 512 gb SSD.

So having >100gb of trash is not a option.

I just want to somehow sync the backup files. Ideally I also don’t want them in my backup or in any history or trash or whatsoever.

The important part is that they are not just on my phone.

here is a script example that you could use to tidy up files and the trashbin… ALL files retention - is it possible ? - #2 by scubamuc you could also simply purge the trashbin regularly, like once a day with a cronjob:

create a root cronjob to run occ trashbin:cleanup --all-users regularly, or run the script in a shell on demand.

 #!/bin/bash

## force purge trashbin per user and groupfolders
echo "PURGE TRASHBIN";
sudo occ trashbin:cleanup --all-users ;
sudo occ groupfolders:trashbin:cleanup -f ;

exit
1 Like