On Windows we handle each configuration entry separately, updating it as needed. But on Linux and macOS we rewrite the entire configuration file every time we store things to disk.
This has the unintended side effect of clearing out old stuff on Linux and macOS, but keeping it around on Windows.
Besides accumulating confusing cruft, this also means we can have issues dealing with migration as we will never lose old stuff on Windows.
We have the ability to remove explicit, named stuff. But it would probably be more robust and stable to clear out everything that is unknown.