Rules and reports

The app has four rules, all in Confluence settings → Legroom. Three of them can delete: they are set on the Rules tab and are switched off after installation. The fourth only reports and is set on the Unused tab.

Rule What it does Set on
Trash Purges pages, blog posts and files that have been in the trash longer than a set time Rules tab
Page versions Deletes old versions of pages and blog posts Rules tab
Attachment versions Deletes old versions of files Rules tab
Unused attachments Reports files that nothing refers to Unused tab

How a rule works

  1. The app keeps an index of the site: spaces, pages, blog posts and files with their sizes, version numbers and dates. A read of the site fills it; events from Confluence and a catch-up read twice a day keep it current.
  2. Once an hour the app looks through the index for objects a rule applies to.
  3. The index only names candidates. Right before the request that deletes, the app reads the object from Confluence again: its state, its space, its labels and, where the rule needs them, its versions. On any doubt the object is skipped.
  4. An entry is opened in the journal before the request and closed after the answer of Confluence. An entry left open by an interrupted run is settled by the next one.

Every rule shows what it would delete before you switch deletion on. Each rule is a card on its tab, and under each rule that can delete, the line “Would purge now” or “Would delete now” counts, from the index, what the rule would delete with the values on the page, whether it deletes or not. Change opens a card, and the line counts again as a field is left. Under the Unused attachments rule the line is called “Past these periods now”. A rule deletes only while Delete automatically is ticked in its card; the card is then marked deleting, otherwise not deleting.

Switching deletion on for a rule asks at Save for a confirmation that shows what the rule would delete now. Making a rule that already deletes keep less asks Delete more? instead. The counts and the confirmation leave out spaces where the app lacks the Admin role, and name them under Not counted. Exemption labels are checked right before deletion, not by these counts, so a counted page or file can still be skipped.

Trash

Purges what has been in the trash of a space longer than the period. Purged content cannot be restored.

Setting Values After installation
Purges what has been in the trash for more than … days 1 to 3,650 30

Page versions and Attachment versions

Both rules keep the current version and delete older ones. The current version is never deleted. The Page versions rule covers pages and blog posts.

Setting Values After installation
What it keeps besides the current version the last … versions, or the versions replaced within the last … days the last … versions
the last … versions 0 to 10,000 50 for pages, 10 for files
the versions replaced within the last … days 1 to 3,650 365

What the two rules free is different. Pages take almost no storage, so the Page versions rule shortens the history and frees next to nothing. Files are what the storage of a Confluence site is made of: the Attachment versions rule is where most of it comes back.

Unused attachments

The rule reports files that nothing refers to. It cannot delete and moves nothing by itself: a file goes to the trash when a Confluence administrator picks it on the Unused tab. Its periods are set there, in the card Unused attachments at the top of the tab, and for a space with rules of its own in the view of the space on the Spaces tab.

A file counts as unused when it is not the cover picture of the page it is attached to and neither that page, nor a comment, a reply or an inline comment on it, nor another page refers to it.

Setting Values After installation
nothing has referred to it for … days 0 to 3,650 30
it was uploaded more than … days ago 0 to 3,650 90
nobody has viewed it for … days 0 to 3,650 90

The periods decide from when on a file can be picked. A file past all three has a checkbox and no status, unless one of the cases below keeps it; the others are shown as kept, with the reason. The line “Past these periods now” in the card counts the files past all three, leaving out the files of pages that keep files.

Moving a file to the trash is the only action of the app that can be undone: the file stays in the trash of its space and can be restored there by a person.

Where rules apply

What protects content

Protection Effect
Exemption label, retention-exempt unless changed Every rule skips a page with the label, together with its files, also in the trash. On a single file it protects that file. Labels that cannot be read in full count as “exempt”.
A space set to No rules No rule touches the space.
At most … deletions per run 1 to 5,000; 500 after installation. Files moved to the trash by hand count as well.
At most … deletions per day 1 to 100,000; 5,000 after installation. Files moved to the trash by hand count as well.
Pause all deletion Stops every deletion at once, after a confirmation, moving picked files to the trash included. Reports keep working. Resume deletion in the message above the tabs asks before lifting it.
License Without an active license nothing is deleted and no file is moved to the trash. A license the app cannot read counts as none.

The exemption label accepts 1 to 255 letters, digits, hyphens, underscores or slashes. Leading and trailing spaces are removed, and letters are stored in lower case.

The journal

The Activity tab lists every deletion the app made and every change of its settings: time, action, object, result (done, failed, in progress or skipped) and details such as the freed size or the reason. Changes of settings name each changed value, with its old and new values; saving values that are already stored writes no entry. Entries are kept for a year.

The tab offers the journal as a CSV file: every entry the app still holds, newest first, up to 100,000 entries. Times are in UTC, and the file says whether the app or an administrator acted, never whose account it was.

The storage report

The Overview and Spaces tabs show for the site, and the view of a space on the Spaces tab for that space:

Pages themselves take almost no storage and are not counted. The Spaces tab offers the report as a CSV file, one line per space, with the sizes in bytes.

A quota is a size set for one space or as a default for every space. A space that reaches 80% of its quota is marked “close to quota”, one that reaches it “over quota”. Nothing is blocked: Confluence offers no way to stop an upload.

The page for space administrators

Space settings → Integrations → Legroom shows the rules that apply to the space, the name of the exemption label, the storage of the space against its quota, and what the older versions of files on its archived pages take. When the Confluence administrator allows it, a space administrator can switch all rules off for the space there and back on. The rules themselves are edited by Confluence administrators only.