Bitwarden is an awesome, cross platform, password manager and generator. With a free account you are able to sync your passwords between your computers regardless of the operating system they are running. On a mobile device? No worries! Bitwarden will also sync your password to that device as well. Overall it is a great little tool to keep your passwords organized and protected. After using it for about a year, the only I really do not like about it is its inability delete, or even view duplicate passwords. After reading through part of Reddit where users were suggesting that I block out a part of my day to import the passwords and secure notes to excel and manually delete passwords that way I decided that there had to be a better option…..
After 10 minutes of DuckDuckGoing (It will catch on just wait) I was able to create a python script that takes the exported Bitwarden Vault as a Comma Separated Values File (CSV) as an input and exports it to a new CSV with the duplicates removed.
To run the code you will need to install python as well as the pandas plugin.
Steps:
1. Export from Bitwarden and Rename
- First we are going to export our Bitwarden Vault to a CSV. This can be done by opening Bitwarden and going to —> File —> Export Vault.
- Select.CSV when it asks for file format.
- Enter your password and download the file.
- Make a copy of the the exported .CSV file and name it to bitwarden.csv.
2. Download the Python Script and Configure Dependenices
The code for the duplicate finder is shown below:
import pandas as pd
df = pd.read_csv('bitwarden.csv', usecols=['folder', 'favorite', 'type', 'name', 'notes', 'fields', 'login_uri', 'login_username', 'login_password', 'login_totp' ]).drop_duplicates(keep='first').reset_index()
file_name = "bitwarden_deduped.csv"
df.to_csv(file_name, index=False) # you don't need to set sep in this because to_csv makes it comma delimited.
3. Run the script!
- Simply run the script by navigating to the directory where you downloaded it and run
python duplicatefinder.py
.
4. Re-Upload Bitwarden Vault
- After the script is run there should be a file called bitwarden_deduped.csv.
- Open up this CSV file in the editor of your choice and check to make sure your important logins, secure notes, etc are still present and not duplicated.
- If everything looks good it is time to re-upload.
- Navigate to your Bitwarden Webvault (typically, Bitwarden Web Vault).
- Verify one last time that all modfications made by the script are valid and that you are not missing any important passwords, secure notes, etc.
- Click Settings at the top of the screen and then scroll to the bottom.
- Select Purge Vault, within the “Danger Zone” area at the bottom of the page.
- Select Purge Vault
- Navigate to the top of the page and select “Tools”
- Select Import Data
- Select the CSV file type and upload bitwarden_deduped.csv
- Select Import Data
Congratulations!
All of your logins and notes should now be de-duplicated and should sync across your devices shortly! Hopefully this saves you some time so you can get back to doing what you do best!
Recent Comments