RT-CLEAN-SESSIONS(1)
π 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 isD(days);H(hour),M(month) andY(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
- fedora 43: rt 5.0.10-1.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms