Bug 360225

Summary: Expire files in apps/okular/docdata/
Product: [Applications] okular Reporter: Martin Schröder <martin>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: wishlist CC: aacid, yu3actxt2tttfimx
Priority: NOR    
Version First Reported In: 0.21.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Martin Schröder 2016-03-07 21:04:17 UTC
Apparently okular saves information about files it has opened in apps/okular/docdata/ - one file for every file ever opened. I now have 2053 files there, the oldest from 2010-11-27.

Please provide a way to automatically delete files there after a certain time (like six months). I know this can easily done with e.g. cron by the user, but in this case I think it's the responsibility of the program that creates these files.

Reproducible: Always
Comment 1 yan12125 2023-08-27 17:15:10 UTC
This issue can be work-arounded with systemd. For example, create a file ~/.config/user-tmpfiles.d/okular.conf with contents

    # Work-around https://bugs.kde.org/show_bug.cgi?id=360225
    e %h/.local/share/okular/docdata  - - - 60d

and enable/start the relevant service with the command

    systemctl --user enable --now systemd-tmpfiles-clean.timer