PURGEPE...SESSIONS(1)

πŸ“¦
version 2.23.4 Β· 6 versions
, in fedora 43, fedora 44

🧼 NAME ✨

okay bestie so this page is PURGEPE...SESSIONS(1) from the User Contributed Perl Documentation collection, and it's all about:

purgePersistentSessions β€” remove persistent sessions that match a certain filter πŸ’…


🌈 SYNOPSIS

purgePersistentSessions [options] [filters]

that's it. that's the whole vibe. options, filters, go 🫢


πŸ’… DESCRIPTION

so here's the tea πŸ“ β€” LemonLDAP::NG stores all your user info in an object called a persistent session. and like… you don't have to purge them, nobody's forcing you. but on the big installs where users come and go constantly, these lil persistent sessions just keep piling up like laundry in your chair 😭 and at some point purging them genuinely makes sense.

that's where this script comes in. it lets you automatically yeet persistent sessions that match one or several filters. group chat cleanup energy. obsessed. ✨


✨ OPTIONS ✨

πŸŽ€ GENERAL OPTIONS

  • --help, -h β€” prints a lil brief help message and then dips. that's it, that's all πŸ’–
  • --debug, -d β€” spills extra diagnostics over to STDERR so you can see what's going on
  • --json, -j β€” logs execution stats as JSON instead of the human-readable text, for when you're feeding it to a machine πŸ¦‹
  • --audit, -j β€” emits an audit log for every single persistent session that gets removed
ngl the page literally lists -j for both --json and --audit πŸ‘€ that's exactly what it says, no cap, i'm just the messenger πŸ’€

πŸ¦‹ FILTERS

filters are the way you tell it which persistent sessions you actually want gone. and bestie, listen: you need to specify at least one filter. if you don't, nothing will be removed. it just sits there. respectfully. πŸ™ˆ

you can stack multiple filters too! and when you do, ALL of them have to match before a persistent session gets deleted. every single one. no partial credit. ⭐

  • --creation=SECONDS β€” the persistent session gets deleted if it was created more than SECONDS ago
  • --last-update=SECONDS β€” the persistent session gets deleted if it was last updated more than SECONDS ago
  • --recent-login=SECONDS β€” the persistent session gets deleted if the login history's most recent successful login happened more than SECONDS ago. and if there are no successful logins at all, then it gets deleted too πŸ‘‘
  • --no-login-success β€” the persistent session gets deleted if its login history contains zero successful logins. this one's highkey useful for clearing out persistent sessions that got created when someone typed a username that doesn't even exist into the login form 😭
  • --no-registered-2fa β€” the persistent session gets deleted if the user has not registered a second factor device πŸ”

πŸ‘€ SEE ALSO

<http://lemonldap-ng.org/> 🌈


πŸ‘‘ AUTHORS

Maxime Besson, <maxime.besson@worteks.com> πŸ’œ


πŸ› BUG REPORT

use the OW2 system to report a bug or ask for features, bestie:

<https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues> 🫢


πŸ“ DOWNLOAD

Lemonldap::NG is available at <https://lemonldap-ng.org/download> ✨


Copyright (C) 2024 by Xavier Guimard, <yadd@debian.org> πŸ‘‘

This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. πŸ’…


okay that's the whole page, go forth and purge responsibly 🧚 this was perl v5.42.3, dated 2026-09-24, and that's the sign-off bestie β€” mwah πŸ’–πŸŒΈ

πŸ“¦ where this page comes from