# Wastebin auto-delete doesn't work

**URL:** <https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111>\
**Category:** Help\
**Tags:** dolphin\
**Created:** [July 22, 2023, 10:00pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111 "2023-07-22T22:00:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arokan](https://discuss.kde.org/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@Arokan](https://discuss.kde.org/u/Arokan)\
**Post date:** [July 22, 2023, 10:00pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/1 "2023-07-22T22:00:15Z")

</div>

Hey!

I love the feature that your wastebin empties step by step when it’s full and after an amount of time respectively.

I let a script run that re-encodes a whole lot of data and trashed the raw files, in case something goes wrong, in order to restore them.  
However, on a fresh install, I configured the wastebin, let the script run, came back and had 120GB in it, the limit being 10GB.

I emptied it, replicated the issue and it is persistent.

What may cause it? Or at least how could I track it? I don’t quite know how to make or view logfiles for dolphin.

Thanks in advance,  
Arokan

---

<div class="post-metadata">

**Author:** ![Duha](https://discuss.kde.org/user_avatar/discuss.kde.org/duha/32/32926_2.png) [@Duha](https://discuss.kde.org/u/Duha)\
**Post date:** [July 23, 2023, 5:44pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/2 "2023-07-23T17:44:01Z")

</div>

With which command do you move the files to trash in your script? Maybe this could be a issue with your CLI tool.

Can you share your script or tell me how you move this files to trash so I can try to reproduce?

If you think this is a KDE specific issue you can file a bug report to [https://bugs.kde.org/](https://bugs.kde.org/)

---

<div class="post-metadata">

**Author:** ![Arokan](https://discuss.kde.org/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@Arokan](https://discuss.kde.org/u/Arokan)\
**Post date:** [July 23, 2023, 7:50pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/3 "2023-07-23T19:50:30Z")

</div>

I’m not using a script per se, I’m using a function of dolphin.  
 ![Screenshot - 23.07.2023 - 21.46.00](https://discuss-cdn.kde.org/uploads/default/original/2X/7/7a0e2392164a38fc432ad47110eb69b29f86bf07.jpeg)

I’m moving the files & folders to wastebin via “Move to Wastebin” (dolphin-\>Right-click) and trash-cli from the debian-repo.

It’s supposed to work as described:  
If a file is older than x, then it gets removed.  
If the wastebin exceeds Y% of total storage, the oldest or biggest file gets removed.

This worked perfectly on my old setup, but it doesn’t now and it’s a tool I really like and use a lot.  
I can’t tell what changed. I don’t know and don’t suspect it’s a KDE-bug, I just don’t know where to start in fixing it. Syslog and Kern.log tell me nothing and I don’t know where to dig deeper.

---

<div class="post-metadata">

**Author:** ![Duha](https://discuss.kde.org/user_avatar/discuss.kde.org/duha/32/32926_2.png) [@Duha](https://discuss.kde.org/u/Duha)\
**Post date:** [July 24, 2023, 3:42pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/4 "2023-07-24T15:42:36Z")

</div>

So I just tried it on my system and it works as you described it without issues.

Some Ideas:

- could be because we run different versions (your might have a bug). I am on Plasma 5.27.6. What version are you running (or which distri)?

- you seem to have multiple wastebins? Can you recheck if you configured the correct wastebin?

- Try `kioclient5` from the `kde-cli-tools` instead of trash-cli  
example: `kioclient5 move file trash:/`

---

<div class="post-metadata">

**Author:** ![Arokan](https://discuss.kde.org/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@Arokan](https://discuss.kde.org/u/Arokan)\
**Post date:** [August 17, 2023, 3:13pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/5 "2023-08-17T15:13:26Z")

</div>

Sorry it took so long. In the meantime, I wrote a script that does half the job if the dolphin wastebin management, though I’d really like it to work as intended.

- I’m on Debian Bookworm, kde-plasma-desktop is 5.142, dolphin is 4.22.12.3-1.
- All are configured correctly
- It didn’t matter whether I put files to wastebin via right-click or trash-cli, it was working as intended on a former installment; I just can’t figure out what changed.  
As far as I remember, the already too place on a fresh install.

Thanks for reading and thinking!  
Arokan.

P.S.: It’s probably, like so often, a minor issue that’s fixed with a one-liner. It’d be helpful if I knew, how to debug dolphin/kde, so I could look into it.

---

<div class="post-metadata">

**Author:** ![Arokan](https://discuss.kde.org/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@Arokan](https://discuss.kde.org/u/Arokan)\
**Post date:** [August 19, 2023, 4:04pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/6 "2023-08-19T16:04:24Z")

</div>

:~$ kshell5 kcm\_trash  
kdeinit5: preparing to launch ‘/usr/lib/x86\_64-linux-gnu/libexec/kf5/klauncher’  
kdeinit5: Launched KLauncher, pid = 168261, result = 0  
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)  
kdeinit5: opened connection to :1  
kdeinit5: Got SHELL ‘kcm\_trash’ from wrapper.  
kdeinit5: preparing to launch ‘’  
KInit could not launch ‘kcm\_trash’.  
kdeinit5: PID 168271 terminated.

Does anybody know, what to make of this?

---

<div class="post-metadata">

**Author:** ![Duha](https://discuss.kde.org/user_avatar/discuss.kde.org/duha/32/32926_2.png) [@Duha](https://discuss.kde.org/u/Duha)\
**Post date:** [August 19, 2023, 4:30pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/7 "2023-08-19T16:30:44Z")

</div>

That command fails for me aswell. Not sure if this is supposed to work.

---

<div class="post-metadata">

**Author:** ![Arokan](https://discuss.kde.org/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@Arokan](https://discuss.kde.org/u/Arokan)\
**Post date:** [August 21, 2023, 7:53pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/8 "2023-08-21T19:53:22Z")

</div>

Okay, you were right all along. 😃  
trash-cli doesn’t trigger the cleanup-process.  
I was assuming the wastebin gets checked once every minutes or so.  
It does get triggered by kioclient5, “move to trash” in context menu, but alas not trash-cli.

I actually don’t know whether this is a bug, because it’s not aware of the contents of the trashbin, or a feature, because it doesn’t waste unnecessary checks.

Thanks for help! 🙂

---

<div class="post-metadata">

**Author:** ![guss77](https://discuss.kde.org/user_avatar/discuss.kde.org/guss77/32/2599_2.png) [@guss77](https://discuss.kde.org/u/guss77)\
**Post date:** [August 21, 2023, 9:26pm UTC](https://discuss.kde.org/t/wastebin-auto-delete-doesnt-work/3111/9 "2023-08-21T21:26:17Z")

</div>

> [@Arokan](#):
>
> $ kshell5 kcm\_trash

I launch the trash configuration dialog using `kcmshell5 kcm_trash`.

> [@Arokan](#):
>
> I was assuming the wastebin gets checked once every minutes or so.  
> It does get triggered by kioclient5, “move to trash” in context menu, but alas not trash-cli.

There’s no timed check for trash bin limits - it probably would not be a good idea anyway, except waste of checks, it means that you can overflow the trash bin for the duration between checks. Instead the check is done whenever you trash a file. If you use something that isn’t KDE to trash the file - even if it obeys the [FreeDesktop.org](http://FreeDesktop.org) trash spec - you don’t get the “KDE magic” working.
