Can't delete imap folder

Yesterday I added two imap accounts to kontact. (I also have a few different pop3 accounts.) Today I decided to delete the imap accounts (they’re both gmail accounts) because they contain too many subfolders, which makes sorting through mail more difficult. But I’m unable to delete the folders–the delete option is greyed out when I right click on the folders, and if I try “delete resource” nothing happens–the imap folders aren’t deleted. I tried to search for the folder’s locations in various config files, thinking that I might be able to delete them there, but I couldn’t find them.

Thanks in advance for any advice.

I managed to solve my little problem: I just had to delete all the subfolders one by one. After the subfolders were gone, the parent imap folders disappeared from the list of mail folders.

Nicely done.

I remember when I first setup like this for testing purpose and looking for a solution to delete the IMAP it was a hard time =)

If you delete the account from the kmail settings it’s done too. IMAP is IMAP, you might even delete folders from the server, which I don’t think your intention is.

Strangely, the imap accounts weren’t listed in kmail’s settings–that was the first place I looked. I made sure to take the folders off line before I deleted them so everything went smoothly–no missing mail!