RT-CLEAN-SESSIONS(1)

πŸ“¦
version 5.0.10 Β· 4 versions
, in fedora 43

πŸ’– rt-clean-sessions β€” bestie edition πŸ’–

okay so this is rt-clean-sessions(1), a User Contributed Perl Documentation page, and honestly? it's giving little script that does a big important job. let's get into it 🫢


✨ NAME ✨

rt-clean-sessions β€” clean old and duplicate RT sessions 🧹🌸


✨ SYNOPSIS ✨

     rt-clean-sessions [--debug] [--older <NUM>[H|D|M|Y]] [--skip-user] [--all]

     rt-clean-sessions
     rt-clean-sessions --debug
     rt-clean-sessions --older 10D
     rt-clean-sessions --debug --older 1M
     rt-clean-sessions --older 10D --skip-user
     rt-clean-sessions --all

like. the range. the versatility. she can be run bare or dressed all the way up πŸ’…


✨ DESCRIPTION ✨

So this script cleans RT sessions, either from the DB or from a directory that's holding session data. 🧼

What does she leave behind? In the DB, only one session per RT user, plus any sessions that aren't older than whatever you specified (peep the options below, bestie πŸ‘€).

And before you get nervous β€” she's safe. Periodt. The data living in these sessions is temporary and can absolutely be deleted. no cap. πŸ’–


✨ OPTIONS ✨

  • --older β€” a date interval written in the "<NUM>[<unit>]" format. Default unit is D (days); H (hour), M (month) and Y (year) are also supported. 🌈

For example: rt-clean-sessions --older 1M would delete all sessions that are older than 1 month.

  • --skip-user β€” by default, only one session per user is left in the DB, which means users who have sessions on multiple computers or in different browsers will be logged out 😭. Use this option to avoid this.
  • --all β€” Use this option to clean all sessions. every last one. she's thorough like that πŸ‘‘
  • --debug β€” Turn on debug output. πŸ”

✨ NOTES ✨

There's functionality similar to this implemented in html/Elements/SetupSessionCookie ; however, that does not guarantee that a session will be removed from disk and database soon after the timeout expires. 😬

This script, if run from a cron job, will ensure that the timed out sessions are actually removed from disk. The Mason component just ensures that the old sessions are not reusable before the cron job gets to them. team work fr fr 🫢✨


okay that's the whole page, no crumbs left, we ate πŸ“

cute little sign-off time: this was rt-clean-sessions(1), shipped as part of the User Contributed Perl Documentation, written against perl v5.42.3, dated 2026-07-20. iconic behavior tbh πŸ’œπŸ§š

reminder bestie: run her from a cron job and your sessions stay clean, your disk stays happy, and nobody's stuck logged in forever 🌸
πŸ“¦ where this page comes from