# Disconnect all sessions/revoking access for all apps of a user

**URL:** <https://help.nextcloud.com/t/disconnect-all-sessions-revoking-access-for-all-apps-of-a-user/37955>\
**Category:** ℹ️ Support\
**Tags:** nc13\
**Created:** [September 29, 2018, 11:47pm UTC](https://help.nextcloud.com/t/disconnect-all-sessions-revoking-access-for-all-apps-of-a-user/37955 "2018-09-29T23:47:50Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![jokabrink](https://help.nextcloud.com/letter_avatar/jokabrink/32/6_22734026db12803ebb3e059622ac3534.png) [@jokabrink](https://help.nextcloud.com/u/jokabrink)\
**Post date:** [August 8, 2022, 2:33pm UTC](https://help.nextcloud.com/t/disconnect-all-sessions-revoking-access-for-all-apps-of-a-user/37955/9 "2022-08-08T14:33:25Z")

</div>

I stumbled across the same issue. Usually, old tokens get cleaned up in the cron scripts, but currently (NC 24) the cron script does not include the deletion of stale login tokens anymore. The job was called `DefaultTokenCleanupJob`. They removed it (accidentally?) in [this PR](https://github.com/nextcloud/server/pull/30016). It is noted in the [Critical changes for developers and admins for Nextcloud 24](https://github.com/nextcloud/server/issues/29914).

However, they plan to add it back in [Nextcloud 25](https://github.com/nextcloud/server/pull/33375). When added back, the `session_lifetime` should work again.

One can check by logging onto the mariadb/mysql process with the nextcloud credentials, select the nextcloud database, and execute `select * from oc_jobs;`. From there, look for `OC\Authentication\Token\DefaultTokenCleanupJob` and compare the column `last_run` which is the unix timestamp.

---

_[View the full topic](https://help.nextcloud.com/t/disconnect-all-sessions-revoking-access-for-all-apps-of-a-user/37955)._
