# Delete E2EE Master Keys

**URL:** <https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906>\
**Category:** Support\
**Created:** [19 October 2018 14:47 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906 "2018-10-19T14:47:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpedro](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cpedro/32/345_2.png) [@cpedro](https://discourse.joplinapp.org/u/cpedro)\
**Post date:** [19 October 2018 14:47 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/1 "2018-10-19T14:47:48Z")

</div>

After enabling and disabling encryption, I noticed Joplin creates a new master key each time. Is there a way to clean these up and delete unused master keys? It seems like they’re stored in the sqlite database, but didn’t want to go hacking through that if there was an easier way.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [19 October 2018 15:00 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/2 "2018-10-19T15:00:49Z")

</div>

It’s not possible but if they are not used anyway, they simply don’t do anything. However, a bigger problem would be to accidentally delete the wrong master key and then end up with items that cannot be decrypted.

Probably if there was a need to keep the list master key cleaner, there could be an option to hide some of them. But deleting them most likely will never be an option.

---

<div class="post-metadata">

**Author:** ![sciurius](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/sciurius/32/132_2.png) [@sciurius](https://discourse.joplinapp.org/u/sciurius)\
**Post date:** [20 October 2018 10:24 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/3 "2018-10-20T10:24:36Z")

</div>

See also [https://github.com/laurent22/joplin/issues/810](https://github.com/laurent22/joplin/issues/810)

---

<div class="post-metadata">

**Author:** ![carlin](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@carlin](https://discourse.joplinapp.org/u/carlin)\
**Post date:** [13 May 2019 08:28 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/4 "2019-05-13T08:28:22Z")

</div>

> [@laurent](#):
>
> But deleting them most likely will never be an option.

Why not?  
Even PGP offers you the ability to delete/manage keys. I do not see where the problem is, as long as you give people enough warnings.  
On the other hand, a proliferation of never-used keys is just plain messy and is not really useful to anyone.

Besides, you end up with the annoying orange "set the password" banner that never disappears unless you set up some password for all the inadvertently-generated keys that will never be used anyway. And this banner takes up screen space both in the apps and on the desktop.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [13 May 2019 09:59 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/5 "2019-05-13T09:59:18Z")

</div>

> [@carlin](#):
>
> Besides, you end up with the annoying orange “set the password” banner that never disappears unless you set up some password for all the inadvertently-generated keys that will never be used anyway. And this banner takes up screen space both in the apps and on the desktop.

The master key is just a row of a few bytes in the database so it doesn't affect anything and even if it's messy, users almost never need to go to the encryption config screen. That being said, I've never realised that it was prompting for password for these old keys with no way to disable the prompt. That should indeed be fixed.

---

<div class="post-metadata">

**Author:** ![carlin](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@carlin](https://discourse.joplinapp.org/u/carlin)\
**Post date:** [13 May 2019 10:31 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/6 "2019-05-13T10:31:24Z")

</div>

Thanks for the reply, Laurent. That fix will definitely improve matters.

---

<div class="post-metadata">

**Author:** ![smackoz](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/smackoz/32/267_2.png) [@smackoz](https://discourse.joplinapp.org/u/smackoz)\
**Post date:** [30 June 2019 09:07 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/7 "2019-06-30T09:07:17Z")

</div>

Agreed, having old keys with a message banner that constantly keeps asking for a password is annoying!

---

<div class="post-metadata">

**Author:** ![smackoz](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/smackoz/32/267_2.png) [@smackoz](https://discourse.joplinapp.org/u/smackoz)\
**Post date:** [30 June 2019 09:08 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/8 "2019-06-30T09:08:40Z")

</div>

> [@laurent](#):
>
> I’ve never realised that it was prompting for password for these old keys with no way to disable the prompt. That should indeed be fixed.

Has this been resolved?

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [30 June 2019 11:06 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/9 "2019-06-30T11:06:50Z")

</div>

true but it’s not fixed yet

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [30 June 2019 20:45 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/10 "2019-06-30T20:45:49Z")

</div>

> [@smackoz](#):
>
> Has this been resolved?

Still not. I agree it's a bit of an annoyance and would certainly accept a pull request for it, but on my side it's relatively low priority.

---

<div class="post-metadata">

**Author:** ![eagle](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@eagle](https://discourse.joplinapp.org/u/eagle)\
**Post date:** [26 July 2019 09:42 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/11 "2019-07-26T09:42:48Z")

</div>

I think it should be fixed, because i suspect it is the cause of this unwanted behaviour:

1. I changed sync from Dropbox to self hosted Nextcloud.
2. Because of this I do no longer want E2EE.
3. Therefore I uninstalled Joplin from all devices except my main desktop computer.
4. On the main computer I disabled E2EE and all notes were decrypted and synced to Nextcloud.

so far so good…

1. I reinstall Joplin on my phone, pad etc and set up sync to the new Nexcloud instance.

2. All notes are synced to the phone

3. Then Joplin insist on having the password for the master key (although the notes are not encrypted).

4. After providing the master key the phone starts sending all notes back to Nextcloud (which in turn makes the desktop computer also pulling all notes back from Nextcloud.

#8 above should not be necessary…

---

<div class="post-metadata">

**Author:** ![githublui](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@githublui](https://discourse.joplinapp.org/u/githublui)\
**Post date:** [1 August 2019 22:36 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/12 "2019-08-01T22:36:28Z")

</div>

Please make it possible to delete unused encryption keys. It is total anoying and confusing! Do you think we are unable to figure out what key we need?  
Or is the problem, that programming of deleting keys is a problem for you?  
Please, leave it to the user to decice what key can be deleteted and which not. Or put at least a hide functionthere.  
Thank you very much,  
Rainer

---

<div class="post-metadata">

**Author:** ![vb0](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/vb0/32/1299_2.png) [@vb0](https://discourse.joplinapp.org/u/vb0)\
**Post date:** [16 August 2019 11:57 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/13 "2019-08-16T11:57:28Z")

</div>

Just to get rid of this I just removed my notebooks on 3 desktops, cleared app data on one mobile and nuked the whole cloud folder after (presumably) one typo in the password on one of the new installs.

I think it’s clear there is a way to make removal of unused (for whatever definition of “unused”) keys perfectly safe (although the discussion about what checks, confirmations and backups need to be done might be a long one, never mind the actual implementation). But until then maybe some sql commands to clean up would be nice (and pretty safe as anyone engaging in such operations would know to make backups).

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [16 August 2019 14:41 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/14 "2019-08-16T14:41:29Z")

</div>

Actually nothing allow us to drop master key now.  
There will be something done later. It’s already between the Laurent’s hands

---

<div class="post-metadata">

**Author:** ![Limping](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Limping](https://discourse.joplinapp.org/u/Limping)\
**Post date:** [3 September 2019 13:20 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/15 "2019-09-03T13:20:28Z")

</div>

> [@eagle](#):
>
> On the main computer I disabled E2EE

If I wish to disable E2EE - can I just follow the [FAQ](https://joplinapp.org/e2ee/)?  
I have a prompt _"One or more master keys need a password. Set the password"_ - so I will just disable all devices one by one, no problems expected?

---

<div class="post-metadata">

**Author:** ![Limping](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Limping](https://discourse.joplinapp.org/u/Limping)\
**Post date:** [18 September 2019 07:56 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/16 "2019-09-18T07:56:10Z")

</div>

I disabled E2EE at all devices one by one.  
Now I have the problem. Joplin crash at 2 different iPad. Crash while syncing WebDAV. And there is still message “One or more master keys need a password. Set the password” at desktop Joplin.  
P.S. The 3rd iOS device syncing the same WebDAV account is iPhone iOS 10.3.3. It does not crash.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [18 September 2019 08:55 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/17 "2019-09-18T08:55:56Z")

</div>

@Limping, can you provide a crash log when it happens? [https://joplinapp.org/debugging/](https://joplinapp.org/debugging/)

---

<div class="post-metadata">

**Author:** ![Limping](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Limping](https://discourse.joplinapp.org/u/Limping)\
**Post date:** [18 September 2019 09:31 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/18 "2019-09-18T09:31:01Z")

</div>

> [@laurent](#):
>
> can you provide a crash log when it happens?

Ok, I will do it.  
Now I press _Export Debug Report_ and i see gray: _Creating report..._ nothing happens. I turned off WiFi, since Joplin crashed as usual during 1-2 minutes after start. At least with WiFi=off it does not crash.

And when I just press _Log_, I can see there _DecryptionWorker_ mistakes. _Has failed more than 2 times_.

---

<div class="post-metadata">

**Author:** ![p6ril](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@p6ril](https://discourse.joplinapp.org/u/p6ril)\
**Post date:** [3 October 2019 19:12 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/19 "2019-10-03T19:12:28Z")

</div>

Joining the crowd here, I created a master key by mistake on a new installation. Basically I configured an encryption password before the 1st sync… I know, what was I thinking !  
Since the master key wasn’t synced yet, obviously a new key was created. Now I have this annoying orange banner on all the clients.

What If I remove the master key file directly ? Would there be side effects ? I read the keys are also referenced in DB. Is there a manual way to clean things up in DB as well to make things right ?

Sorry I realize it’s my mistake and not many people may be concerned (hence not high priority), but still, shit happens and considering the exchange other people would like to get rid of unused keys. Even something manual would be fine if such a thing is possible in order to avoid providing something in the client (as I agree people erasing the wrong key by mistake would be much worse).

Removing the annoying banner would be the least but I’d rather a proper cleaning method than just masking things up.

Thanks in advance.

Cyril

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [3 October 2019 21:38 UTC](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906/20 "2019-10-03T21:38:37Z")

</div>

For now, can’t you input the password for the master key? That will remove the orange banner.

Otherwise:

You can delete the master key (the .md file) from the sync target, and that will delete it from all the clients after sync. But it’s generally not recommanded to directly change stuff on the sync target.

[Next page](https://discourse.joplinapp.org/t/delete-e2ee-master-keys/906.md?page=2)
