# New Plugin: kirby-trash / a "proper" trash can for Kirby (restore deleted pages and files)

**URL:** <https://forum.getkirby.com/t/new-plugin-kirby-trash-a-proper-trash-can-for-kirby-restore-deleted-pages-and-files/35503>\
**Category:** Plugins\
**Tags:** v5\
**Created:** [July 7, 2026, 10:26am UTC](https://forum.getkirby.com/t/new-plugin-kirby-trash-a-proper-trash-can-for-kirby-restore-deleted-pages-and-files/35503 "2026-07-07T10:26:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthias.schmidt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/matthias.schmidt/32/15192_2.png) [@matthias.schmidt](https://forum.getkirby.com/u/matthias.schmidt)\
**Post date:** [July 7, 2026, 10:26am UTC](https://forum.getkirby.com/t/new-plugin-kirby-trash-a-proper-trash-can-for-kirby-restore-deleted-pages-and-files/35503/1 "2026-07-07T10:26:32Z")

</div>

Hi everyone,

I would like to share my first Kirby plugin:

# **kirby-trash** - a “proper” trash can for Kirby.

Deleted pages and files are not removed instantly (as per default in Kirby) but moved to a trash where they can be restored or deleted permanently, via a dedicated Panel area:

![The trash area in the Kirby Panel](https://raw.githubusercontent.com/sigtrygg-space/kirby-trash/main/.github/screenshot.png)

## How it works:

the plugin listens to the `page.delete:before` / `file.delete:before` hooks and copies the affected content (including all translations, files, subpages and Kirby 5 `\_changes` versions) into a configurable trash storage before Kirby deletes it. If the safety copy fails, the deletion is blocked, so content never gets deleted without a copy. Restoring puts everything back verbatim, so UUIDs and internal links survive.

* * *

## Features:

- Panel area with a table view (original path, size, deletion date, time left / see screenshot) and a details dialog with direct restore/delete actions

- Automatic cleanup with configurable retention (default 30 days, set to `-1` to keep indefinitely) plus a `kirby trash:cleanup` CLI command for cronjobs (if you need “precision cleanup” - otherwise, cleanup will occur on your next visit to the kirby-trash panel area)

- Per-role permissions (`access`, `restore`, `delete`), `admin`-only by default

- `enabled` and `root` options accept closures, e.g. to switch by environment

- English and German translations

* * *

## Installation:

```bash
composer require sigtrygg-space/kirby-trash

```

Requires Kirby 5 and PHP 8.2+.

* * *

## Links:

[Plugin page](https://plugins.getkirby.com/sigtrygg-space/kirby-trash)

[Repository](https://github.com/sigtrygg-space/kirby-trash)

[Packagist](https://packagist.org/packages/sigtrygg-space/kirby-trash)

* * *

This is my first plugin. I am very open to feedback of any kind: bug reports, API design opinions, translations, naming, edge cases I have not thought of.

The current version is a v0.1.2 pre-release - issues and PRs are welcome on GitHub, or just reply here.

Thanks for reading, and I hope it is useful to some of you!

> ## A note on the building method
> 
> I started working on this Idea a few years back as part of a website project but I never quite got around to finishing it. Claude to the rescue: **kirby-trash** now exists - not just for my project, but as a free plugin for Kirby 5.
> 
> So, yeah - **kirby-trash** was co-authored by Claude Fable 5: The code was developed on the basis of my unfinished work, then reviewed and tested in an iterative loop between two AI Instances (build + audit) and some human interference from my part, including a full manual test setup.

---

<div class="post-metadata">

**Author:** ![matthias.schmidt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/matthias.schmidt/32/15192_2.png) [@matthias.schmidt](https://forum.getkirby.com/u/matthias.schmidt)\
**Post date:** [July 8, 2026, 7:44am UTC](https://forum.getkirby.com/t/new-plugin-kirby-trash-a-proper-trash-can-for-kirby-restore-deleted-pages-and-files/35503/2 "2026-07-08T07:44:24Z")

</div>

**kirby-trash** v0.2.0 is now live

features: menu badge with item count, warn state for expiring items

bumped to **kirby-trash** v0.2.2

now using precompiled Panel components (no more vue-compiler), graceful handling of unusable trash roots

**kirby-trash** v0.3.0 is now live

features: menu badge improvements, cleanup-feedback and a button that lets the user postpone automatic deletion

* * *

this may very well be the final pre-release before v1.0.0  
(unless there is feedback from your side, dear tester)

---

<div class="post-metadata">

**Author:** ![matthias.schmidt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/matthias.schmidt/32/15192_2.png) [@matthias.schmidt](https://forum.getkirby.com/u/matthias.schmidt)\
**Post date:** [August 19, 2026, 9:45am UTC](https://forum.getkirby.com/t/new-plugin-kirby-trash-a-proper-trash-can-for-kirby-restore-deleted-pages-and-files/35503/3 "2026-08-19T09:45:31Z")

</div>

Just bumped **kirby-trash** to v0.6.0

v0.4 introduced preview-images for trashed items in the trashcan  
v0.5 improved those by adding a size option and improved details dialog and general ui  
v0.6 is an improvement of the postpone-deletion feature introduced in v0.3 - you can now schedule a specific deletion date or keep items in trash indefinitely (overwriting default deletion-period). fixed sorting of trashed items on the way (items are now correctly sorted by their time left in the trash)

* * *

so, yeah… v0.3 was not the final prerelease.  
v0.6 might be 🙂

---

<div class="post-metadata">

**Author:** ![matthias.schmidt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/matthias.schmidt/32/15192_2.png) [@matthias.schmidt](https://forum.getkirby.com/u/matthias.schmidt)\
**Post date:** [August 21, 2026, 10:12am UTC](https://forum.getkirby.com/t/new-plugin-kirby-trash-a-proper-trash-can-for-kirby-restore-deleted-pages-and-files/35503/4 "2026-08-21T10:12:55Z")

</div>

**kirby-trash** is now at v0.7.0

I noticed that “Empty Trash” was deleting _all_ items from the trash, including those marked as “Keep indefinitely”. I thought this was rather counterintuitive.

Now, “Empty Trash” only removes items that would be deleted automatically at some point anyway. Items marked as “Keep indefinitely” can only be deleted manually, one by one.
