Skip to content

Easy-to-review script to remove exact duplicate items and foldres from a BitWarden vault and prune empty folders

License

Notifications You must be signed in to change notification settings

jq6l43d1/minimal-bitwarden-dedup-folders

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a script to remove duplicate entries and folders from a BitWarden vault. This script also prunes empty folders. No dependencies except the JSON standard library.

This is a fork of https://github.com/DustinWehr/minimal-bitwarden-dedup

I'd like to thank Dustin Wehr for his wonderful script.

Usage

1. Save other work and close programs

Because you'll restart your computer at the end.

2. Make and mount a RAM disk

Don't save your unencrypted vault to persistent storage (HDD/SSD), as you'd need to securely erase it, which is not as easy as some might expect.

Linux (and OSX?)

Makes a 10MB RAM disk.

$ sudo mkdir /mnt/ramdisk
$ sudo mount --types tmpfs --options rw,size=10M tmpfs /mnt/ramdisk

Windows

If you know an easy way (without external software?), please tell me, or better yet open a pull request with your tested instructions.

3. Review bitwarden_dedup.py

Check that I'm not stealing all your passwords.

4. Export vault in JSON

Save it to your mounted RAM disk.

Google how to do this for your BitWarden client.

5. Dedupe

Replace the path values VAULT_WITH_DUPS_PATH and VAULT_DEDUPED_OUTPUT_PATH in bitwarden_dedup.py with the appropriate ones for your RAM disk and exported vault, then do:

$ python3 bitwarden_dedup.py

Which writes to the file at VAULT_DEDUPED_OUTPUT_PATH.

6. Purge your BitWarden vault, then import deduped JSON

Google how to do this for your BitWarden client.

7. Power cycle your computer

We could overwrite your secrets on the RAM disk, but I can't do anything foolproof in python about the temporary memory that the script uses, which also contained your unencrypted secrets, so turn off and then on your computer now to clear your RAM.

About

Easy-to-review script to remove exact duplicate items and foldres from a BitWarden vault and prune empty folders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%