There is currently no way to delete the profile cleanly.
Normally we advice users to just delete the application, but then abandoned profile remains in the chats. It is possible to leave all the group chats and channels first manually, but this will still leave 1:1 chats with you for your contacts without any indication that the chat is no longer useful because you are not going to receive messages.
This may also be useful in case the profile is compromised, e.g. one of the user devices was stolen or the user has uploaded unencrypted backup somewhere. There is a related topic about removing a single device but such device management is a more difficult problem.
What I propose is a new “delete profile” action that should replace your contact with a “ghost” avatar similar to “Deleted Account” in Telegram or “Deleted User” in Discord or “Delted account” in Signal. Here is how such deleted accounts look like in a group member list in Signal:
Technically OpenPGP already has a way to attach revocation to the public key, so it can be gossiped via Autocrypt headers to distribute the info about the profile being abandoned. I have not figured out how to initially distribute the revocation. Traditionally keyservers are used for this, but Delta Chat does not use them and tries to avoid talking to any third-party servers. At the same time you want to distribute your revocation as widely as possible and possibly, but don’t want to send any messages after you delete the profile. Maybe it is enough to just send the message updating your key once into every recently active chat. We can also sidestep this question by allowing the user to export such “revoked contact” of self as a vCard and leaving the problem of distributing it to the user, e.g. in case the user just wants to switch to a new profile and not stop using Delta Chat completely, they can import abandoned profile contact and will automatically gossip the revocation in shared groups.
in general, i like the idea to also leave chats somehow when deleting a profile - that would probably be already a big plus, cryptographic revocation or not.
however, as we do not know if a profile is used on other devices, that may easily end up in a user question that can confuse user - users do not read - and let them make wrong or uninformed decisions. also, user will still just uninstall the app, so the underlaying issue is by far not fixed.
so, as first steps, it seems better to deal with stale profiles better - as there are also ideas around when it comes to error handling etc.
Leaving the chat creates noise with “user left the chat” info messages. In Telegram/Discord/Signal when user deletes a profile this works differently: their avatar is replaced with “Deleted user” and nobody is notified about this. “Tombstone” is even left in the chat in all of them, however this is probably because it can still be restored, if this is not reversible then no need to have “deleted user” in group member list.
As for abandoned profiles, we indeed still have to deal with them, I don’t suggest a solution for this. Telegram/Discord/Signal also have abandoned profiles next to deleted profiles.
This proposal is mostly for the use case of user switching to another profile (because they have lost another device or for whatever reason) as a simpler alternative “device management” in the linked topic that seems too complicated and maybe impossible even. In this use case user wants to still keep using Delta Chat, but wants to cleanly shutdown old profile and make sure as many as possible contacts know that the profile should not be used or it may even be dangerous to send encrypted messages to it if the profile was stolen.
I also think revoking profile key should keep the “disabled” profile on the device, to be able to still access chat history, forward messages to another profile, export contacts etc. Profile should also be disabled similarly on other devices when devices get the revocation signature.
I think this is a normal desire of users, regardless if it’s a chatmail profile or not. Adding the ability to delete a profile gives the user “agency” and direct control over the account; “just wait 90 days and we promise it will get auto-deleted” removes direct control and intent by the user. Allowing the user to delete a profile with an in-app click (sic) is a good feature to have for user peace of mind.