# Issue with Automatic Deletion of Files from Trashbin in Nextcloud Snap

**URL:** <https://help.nextcloud.com/t/issue-with-automatic-deletion-of-files-from-trashbin-in-nextcloud-snap/180068>\
**Category:** ℹ️ Support\
**Tags:** snap, nc27\
**Created:** [January 26, 2024, 9:39pm UTC](https://help.nextcloud.com/t/issue-with-automatic-deletion-of-files-from-trashbin-in-nextcloud-snap/180068 "2024-01-26T21:39:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dilute8788](https://help.nextcloud.com/letter_avatar/dilute8788/32/5_5575768a8748004e209b776fc1b2916d.png) [@Dilute8788](https://help.nextcloud.com/u/Dilute8788)\
**Post date:** [January 26, 2024, 9:39pm UTC](https://help.nextcloud.com/t/issue-with-automatic-deletion-of-files-from-trashbin-in-nextcloud-snap/180068/1 "2024-01-26T21:39:21Z")

</div>

Nextcloud version: 27.1.4  
Operating system and version: Ubuntu 22.04.3 LTS  
Apache or nginx version: unsure (bundled with snap)  
PHP version: unsure (bundled with snap)

The issue you are facing:

Is this the first time you’ve seen this error? Y

Steps to replicate it:

1. Used OCC command `sudo nextcloud.occ config:app:set files_trashbin trashbin_retention_obligation --value='auto, 30'` to set trashbin retention policy.
2. Verified if the above parameter is set successfully using `sudo nextcloud.occ config:list` command.
3. Ran “update oc\_jobs set last\_run=0” to database (per [Empty trashbin automatically - #16 by apassi](https://help.nextcloud.com/t/empty-trashbin-automatically/75933/16))
4. Checked if Nextcloud cron jobs are running properly using the `sudo snap logs nextcloud.nextcloud-cron` command.
5. Trashed files \> 30 days old are still in the trash

The output of your Nextcloud log in **Admin \> Logging** :

No relevant logs

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
<?php  
$CONFIG = array (  
'apps_paths' =>  
array (  
0 =>  
array (  
'path' => '/snap/nextcloud/current/htdocs/apps',  
'url' => '/apps',  
'writable' => false,  
),  
1 =>  
array (  
'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',  
'url' => '/extra-apps',  
'writable' => true,  
),  
),  
'supportedDatabases' =>  
array (  
0 => 'mysql',  
),  
'memcache.locking' => '\\OC\\Memcache\\Redis',  
'memcache.local' => '\\OC\\Memcache\\Redis',  
'redis' =>  
array (  
'host' => '/tmp/sockets/redis.sock',  
'port' => 0,  
),  
'log_type' => 'file',  
'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',  
'logfilemode' => 416,  
'passwordsalt' => '[REDACTED]',  
'secret' => '[REDACTED]',  
'trusted_domains' =>  
array (  
0 => 'localhost',  
1 => '[REDACTED]',  
2 => '[REDACTED]',  
),  
'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',  
'dbtype' => 'mysql',  
'version' => '27.1.4.1',  
'overwrite.cli.url' => 'http://localhost',  
'dbname' => 'nextcloud',  
'dbhost' => 'localhost:/tmp/sockets/mysql.sock',  
'dbport' => '',  
'dbtableprefix' => 'oc_',  
'mysql.utf8mb4' => true,  
'dbuser' => 'nextcloud',  
'dbpassword' => '[REDACTED]',  
'installed' => true,  
'instanceid' => '[REDACTED]',  
'maintenance' => false,  
'loglevel' => 2,  
'theme' => '',  
'memories.exiftool' => '/var/snap/nextcloud/38457/nextcloud/extra-apps/memories/bin-ext/exiftool-amd64-glibc',  
'memories.vod.path' => '/var/snap/nextcloud/38457/nextcloud/extra-apps/memories/bin-ext/go-vod-amd64',  
'memories.gis_type' => 1,  
'memories.ffmpeg_path' => '/var/snap/nextcloud/bin/ffmpeg',  
'memories.ffprobe_path' => '/var/snap/nextcloud/bin/ffprobe',  
'ffmpeg' => '/var/snap/nextcloud/bin/ffmpeg',  
'enabledPreviewProviders' =>  
array (  
0 => 'OC\\Preview\\Movie',  
1 => 'OC\\Preview\\Image',  
),  
'memories.vod.ffmpeg' => '/var/snap/nextcloud/bin/ffmpeg',  
'memories.vod.ffprobe' => '/var/snap/nextcloud/bin/ffprobe',  
'memories.vod.vaapi.low_power' => true,  
);
```

---

<div class="post-metadata">

**Author:** ![Dilute8788](https://help.nextcloud.com/letter_avatar/dilute8788/32/5_5575768a8748004e209b776fc1b2916d.png) [@Dilute8788](https://help.nextcloud.com/u/Dilute8788)\
**Post date:** [January 26, 2024, 10:07pm UTC](https://help.nextcloud.com/t/issue-with-automatic-deletion-of-files-from-trashbin-in-nextcloud-snap/180068/2 "2024-01-26T22:07:55Z")

</div>

I have also tried adding ‘trashbin\_retention\_obligation’ =\> ‘auto, 30’, to the config.php file manually rather than using the occ command, with the same result.

---

<div class="post-metadata">

**Author:** ![Dilute8788](https://help.nextcloud.com/letter_avatar/dilute8788/32/5_5575768a8748004e209b776fc1b2916d.png) [@Dilute8788](https://help.nextcloud.com/u/Dilute8788)\
**Post date:** [January 27, 2024, 12:40pm UTC](https://help.nextcloud.com/t/issue-with-automatic-deletion-of-files-from-trashbin-in-nextcloud-snap/180068/3 "2024-01-27T12:40:47Z")

</div>

After waiting some time (with the changes to config.php), it seems to be working now.

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [February 4, 2024, 12:41pm UTC](https://help.nextcloud.com/t/issue-with-automatic-deletion-of-files-from-trashbin-in-nextcloud-snap/180068/4 "2024-02-04T12:41:03Z")

</div>

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
