# Restore messages locally deleted before

**URL:** <https://forum.delta.chat/t/restore-messages-locally-deleted-before/2786>\
**Category:** Mutual Help\
**Created:** [November 7, 2023, 9:14pm UTC](https://forum.delta.chat/t/restore-messages-locally-deleted-before/2786 "2023-11-07T21:14:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zone42](https://forum.delta.chat/user_avatar/forum.delta.chat/zone42/32/805_2.png) [@zone42](https://forum.delta.chat/u/zone42)\
**Post date:** [November 7, 2023, 9:14pm UTC](https://forum.delta.chat/t/restore-messages-locally-deleted-before/2786/1 "2023-11-07T21:14:28Z")

</div>

The “_Delete messages from device_” option was inadvertently activated on my end device. As a result, some messages were deleted locally. However, they are still available on the server.

Is there a way to restore them locally?

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/user_avatar/forum.delta.chat/link2xt/32/1971_2.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [November 7, 2023, 9:16pm UTC](https://forum.delta.chat/t/restore-messages-locally-deleted-before/2786/2 "2023-11-07T21:16:45Z")

</div>

You can move the messages to another folder on the server and then move them back into INBOX, they should be redownloaded.

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/user_avatar/forum.delta.chat/link2xt/32/1971_2.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [November 9, 2023, 12:46am UTC](https://forum.delta.chat/t/restore-messages-locally-deleted-before/2786/4 "2023-11-09T00:46:26Z")

</div>

Here is a thread that documents workaround with moving the messages between folders:

> [@\[WORKAROUND\] Make new Delta Chat installation import old messages from IMAP directory](https://support.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262):
>
> Expected behavior When I install Delta Chat I would want it to import all conversations in the IMAP directory DeltaChat. Actual behavior I install Delta Chat and only new conversations appear (those after the install). I can still see old ones in the DeltaChat directory in Thunderbird but they won’t appear on the Android app or Desktop app, even though the setting for reading this directory is enabled.

There is also a related feature request:

> [@Download old messages](https://support.delta.chat/t/download-old-messages/1693):
>
> Loading old messages is something very requested for a long time, perhaps one way to implement it is using the “Contact Request” window when loading messages: for new contacts, use a behavior similar to the “Contact Request” as before. for old contacts, show the messages in the corresponding chat, but also show them here in “Contact Request” until the user leaves this page.

> [@anon76174457](#):
>
> As an issue often and for many, good master link2xt, and hard to figure out by oneself: maybe worthy a very core function of the app (advanced settings: restore/redownload all messages from the server and restore only all DC messages from the Server).

The reason there is no such function is that the result of downloading old messages is not very nice: Delta Chat generally places downloaded messages below the last read messages so you cannot miss them and everywhere we assume that messages are processed in the chronological order as they are received, e.g. when we receive “Member added”, “Member removed”, group avatar changes and so on.

If we want to do it properly, we should find the lowest message UID that we know and download batches of messages with this UID-100 to this UID, process them ignoring any group member changes and key changes and place them where they are expected to be according to the `Date` header. This is a different way of processing the messages if we want to make it a nice user function rather than a workaround for an emergency situation.

As we don’t know which message belongs to which chat, we also cannot download only messages belonging to the chat when you scroll to the top of it and want to see more history of this particular chat. Best thing we can do is “download N more old messages” and sort them into the chats.

If you have another device which has history still saved such as your desktop, best thing to do is to transfer a backup from your desktop to the phone. Or you can restore your old backup, it will then download new messages in the correct order.

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/user_avatar/forum.delta.chat/link2xt/32/1971_2.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [November 9, 2023, 6:13pm UTC](https://forum.delta.chat/t/restore-messages-locally-deleted-before/2786/6 "2023-11-09T18:13:29Z")

</div>

We can easily implement a button “download +100 older messages” that does something similar without even moving the messages back and forth between the folders. But the result is not always nice because these old messages will be added to the end of the chat and so on, this is why we can only recommend this to users as an emergency workaround. If we implement it as a messenger function, we have to implement it properly, placing the messages where they should be, ignoring group avatar, member list and key changes and so on.

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [October 6, 2026, 3:15pm UTC](https://forum.delta.chat/t/restore-messages-locally-deleted-before/2786/8 "2026-10-06T15:15:10Z")

</div>


