Skip to content

Instantly share code, notes, and snippets.

@johnl
Created February 15, 2018 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnl/88de49a3e47d40b8f0a08ea3e9128570 to your computer and use it in GitHub Desktop.
Save johnl/88de49a3e47d40b8f0a08ea3e9128570 to your computer and use it in GitHub Desktop.
rough and dangerous script to delete all keys in gnome-keyring matching a certain application id
#!/usr/bin/env python
import getpass, re, sys
import gnomekeyring
all_items = gnomekeyring.list_item_ids_sync("login")
for item in all_items:
attributes = gnomekeyring.item_get_attributes_sync("login", item)
if attributes.has_key("application") == False or attributes["application"] != "chrome-10788085": continue
print attributes["action_url"]
gnomekeyring.item_delete_sync("login", item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment