public void cleanup(UUID uuid) {
        // unload users which aren't online and who haven't been online (or tried to login) recently
        if (this.recentlyUsed.contains(uuid) || this.recentlyUsedApi.contains(uuid) || this.plugin.getBootstrap().isPlayerOnline(uuid)) {
            return;
        }

        User user = this.userManager.getIfLoaded(uuid);
        if (user == null) {
            return;
        }

        if (this.plugin.getEventDispatcher().dispatchUserUnload(user)) {
            return;
        }

        // unload them
        if (this.plugin.getConfiguration().get(ConfigKeys.DEBUG_LOGINS)) {
            this.plugin.getLogger().info("User Housekeeper: unloading user data for " + uuid);
        }
        this.userManager.unload(uuid);
    }
The instance responsible for unloading users which are no longer needed.
common/src/main/java/me/lucko/luckperms/common/model/manager/user/UserHousekeeper.java