MozillaZine

IMAP folder cannot be deleted

From MozillaZine Knowledge Base

This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

If you try to delete an IMAP mail folder and it fails you typically get an error message such as: "The current command did not succeed. The mail server responded: RENAME failed: Can't create mailbox [folder name]: File Exists.".

There are several things you can try:

  • Go to "Tools -> Account Settings -> Server Settings" and change the option for "When I delete a message" to "Remove it immediately." Try again.
  • Some mail servers may prevent you from deleting or renaming subscribed folders if you are configured to move deleted messages to the Trash folder. Try unsubscribing your Trash folder. Right click on the remote inbox, select "Subscribe", expand the folder listing, uncheck the Trash folder and press the OK button. If this works then you should either leave the Trash folder unsubscribed or change what Thunderbird does in "When I delete a message" (see above). [1]
  • Your mailbox might be almost full, so there is no room to copy the deleted folder to the Trash folder. Compact the folders, empty the Trash folder, compact the Trash folder, and then try again.
  • Is the folder empty? Its possible either Thunderbird or your email provider is recreating it when you restart Thunderbird because its a required folder. See if you can tell Thunderbird to use a different folder (or a folder in a different account) using "Tools -> Account Settings -> Copies & Folders".
  • If you get a "Some of the requested messages no longer exist " error message it might be due to a cache on the IMAP server. [2] Log into your webmail account using a browser and see if there is anything like a "imap-cache" folder. If so, delete its contents but do not delete the folder.
  • Is it a offline folder specified in Tools -> Account Settings -> Offline & Disk Space? If so, remove the folder from that list and try again. It shouldn't have any impact until you synchronize the folders but it can be tricky configuring the behavior of offline folders.
  • Log into webmail using a browser and delete the folder.

See Also