Management commands

These management commands are necessary for enabling certain features and for database cleanup.

Example usage:

cd tests/
./ <command> <args>

In this page we list the management commands currently available in django-freeradius.


This command deletes RADIUS accounting sessions older than <days>.

./ delete_old_radacct <days>

For example:

./ delete_old_radacct 365


This command deletes RADIUS post-auth logs older than <days>.

./ delete_old_postauth <days>

For example:

./ delete_old_postauth 365


This command closes stale RADIUS sessions that have remained open for the number of specified <days>.

./ cleanup_stale_radacct <days>

For example:

./ cleanup_stale_radacct 15


This command deactivates expired user accounts which were created temporarily (eg: for en event) and have an expiration date set.

./ deactivate_expired_users


This command deletes users that have expired (and should have been deactivated by deactivate_expired_users) for more than the specified <duration_in_months>.

./ delete_old_users --older-than-months <duration_in_months>

Note that the default duration is set to 18 months.