rt-clean-sessions(8)

🧼 NAME 🧼

okay so bestie, say hi to rt-clean-sessions β€” she cleans out old and duplicate RT sessions, no cap πŸ’–


✨ 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

πŸ’… DESCRIPTION πŸ’…

This script literally cleans RT sessions out of your DB or out of a dir that's holding session data. When she's done, the DB keeps exactly one session per RT user, plus any sessions that aren't older than whatever you told her (peep the options, bestie πŸ‘€).

And fr fr, this script is safe to run β€” the data chilling in those sessions is temporary and can be deleted. It's giving spring cleaning, not it's giving data loss. πŸŽ€


🌸 OPTIONS 🌸

  • older (--older) β€” a date interval in the "<NUM>[<unit>]" format. The default unit is D (ays), and H (our), M (onth) and Y (ear) are supported too. For example: "rt-clean-sessions --older 1M" would delete all sessions that are older than 1 month. ⏳
  • skip-user (--skip-user) β€” by default only one session per user is left in the DB, so users that have sessions on multiple computers or in different browsers will be logged out 😭. Use this option to avoid that. You're welcome πŸ’–
  • all (--all) β€” use this option to clean all the sessions. all of them. every single one. periodt.
  • debug (--debug) β€” turn on debug output. πŸ› she'll tell you what she's doing, slay

πŸ¦‹ NOTES πŸ¦‹

There's functionality similar to this living 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 make sure that the timed out sessions are actually removed from disk; the Mason component just makes sure that the old sessions aren't reusable before the cron job gets to them. iykyk 🧚

so like… run her from cron and she'll handle it. the Mason component is just the bouncer, this script is the one actually clearing the room πŸ’€βœ¨

okay that's the whole vibe, bestie β€” this page is perl v5.40.1, dated 2026-06-21, and it's giving rt-clean-sessions(8) main character energy πŸ‘‘πŸ«Ά go run her from a cron job and watch the old sessions disappear πŸ’œ

πŸ“¦ where this page comes from