Skip to content

[th/keyfile-db-stale-entries] garbage collect (prune) old information from /var/lib keyfiles

Thomas Haller requested to merge th/keyfile-db-stale-entries into main

we have two keyfiles

  • /var/lib/NetworkManager/timestamps
  • /var/lib/NetworkManager/seen-bssids

These contains information per (connection) UUID.

When we delete a profile, we would remove the UUID from those files, but that does not work if you remove the files while stopping NetworkManager. So it's easy that lots of stale entries pile up there. I had 10k entries in my file.

I think we need to delete UUIDs that we no longer recognize. Of course, that means if you "temporarily" remove a profile and recreate it later, then the information is lost. There is no good solution for this, either we don't garbage collect, or we make a decision what is unused (which might be wrong, in contrived examples).

Also, I had several stale .XXXXXX files, delete those too.

Also, cleanup handling of wifi.seen-bssid connection property.

Merge request reports