CCleaner won't delete .emi files

I’m using Duplicate Finder to delete a large amount of duplicate files on an external backup hard drive. But CCleaner won’t delete .emi (email) files. Anyone know why? Appreciate your help.

The Delete button will be greyed out until you select some to delete.

If you have selected the ones that you want to delete and CCleaner can’t do that then do you get an error message?
I would suspect that it’s a permissions issue.
eg. maybe the files are read-only, or actually stored on the email server rather than your machine.

You can output the search results to a textfile so that you can go to the folder and try to delete the duplicates manually.

PS. You can right-click on any of the results and the context menu that pops up gives you various extra options for selecting things, etc.

Thanks for the response.

I have been able to delete hundreds of photo and document files by doing these steps you described. However, when I select .eml files and try to delete them, CCleaner’s completion message says “some files were not able to be deleted” or words to that effect.

I’ll try to check to see if they’re read-only. Each of them were manually saved via my email program to my external hard drive and the emails in my program were then deleted. So I’m not sure they would still be linked to a server.

Having a look online it appears to be a fairly common problem and seems to be caused by who or what has ownership of the file.
(I’ve had similar ‘ownership’ issues in the past with certain files, usually ones that had been copied over from another computer, and I had to take ownership or remove a users permissions before I could alter or delete them).

I came across this where someone was having the same issue with deleting eml’s, and they found that they could delete the problem eml’s by using the delete in the right-click context menu.
It’s from 2010 but still worth a try:

… right click on the the .eml file and select “open file location”. The folder opens in a new window right click on the same .eml file and “delete” option in the context menu works.

There is no “open file location” option when I right-click on an .eml file in CCleaner or in Windows File Explorer. I can delete any and all .eml files in Explorer but I want to keep one of each .eml file and I don’t think there’s any quick way to get a list of duplicate files in Explorer. That’s what CCleaner seems to be very good at doing and why I think it should allow .eml files to be deleted no matter their properties or settings. It’s up to the user to decide which files to delete when it comes to any other file type I’ve come across.

Apperciate any other assistance.

It will be Windows that is preventing deletion, not CCleaner.

It is interesting that you say there is no ‘Open containing folder’ for your duplicates though.
I just saved an eml and created a copy here and right-clicking on it the option is there:


I can also delete the copy from CCleaner without a problem.

Could you post a clip of your search options, similar to this:


and a clip of one or more of the problem results, showing the full file and full pathnames:

Here are those screen shots. I can open the “open container folder” but it takes me to this screen and I have no idea where to go from there.

I tried to upload the other two screen shots but apparently new users like me can only upload one shot per reply. I’ll try to upload the others in two different replies.

FYI, the Seagate drive is my backup hard drive and where these .eml files are located.

Here is the file and folder location for the .eml files.

Thanks,
The setting has only recently been changed to allow new users to post images at all.
I wasn’t aware that they had set it to only one image per post, (though I understand why they did).
I have now tweaked your user settings so that you should now be able to post more than one at a time.

The screenshots themselves are helpful.

I see that you were searching on name.
It’s not usually the best way as different files, in different folders, can have the same name.
(eg. ‘Photo1.jpg’ in one folder may be from a wedding, whereas ‘Photo1.jpg’ in a different folder may be a holiday snap).
It’s better to search for ‘Contents’ (which also sets ‘Size’) so that it only finds exact duplicates.

I’m fairly sure I may know now why CCleaner cannot delete these files.

I see that these are duplicate files in monthly backups, and from the look of the names you appear to make full backups rather than incremental backups.
Is that correct?

eg. The one that is selected is a backup made on 3rd March 2024 of an email archive from 2016.
You have many copies of it there, a couple of years worth at least.

It doesn’t show there but I suspect that these backups may be in a compressed format, maybe a zip format, if so then that will probably be why CCleaner won’t be able to delete them.
A zip or similar compressed file is one file containing lots of other files in a compressed format.

CCleaner can only delete a whole file, ie. it can’t delete just certain contents of a zip or other compressed file it could only delete the whole zip and everything it contains.

Would I be correct in thinking that you are running out of space on the backup drive and so now want to remove old backups to clean it up?

There are a few options:

You appear to be willing to delete the old backup files so your backup software should be able to remove old backups safely for you.
What backup software are you using to make the backups?

Alternatively you could manually delete the old backups entirely, leaving say just the last 10 or so.

(See below for how I automatically delete old backups so my backup drive is not going to get filled with old ones).

Or if you don’t want to lose the old backups then as it looks like F: is an external drive you could retire it and put it somewhere safe, and get a new backup drive to use as a new F:.

Or if F: is an internal drive you could copy them off F: to an external drive and start fresh with an empty internal F:

  • For my main backups I use Macrium Reflect to make whole drive images.
    (It takes about 6 minutes to do a full image backup of this Win 11 laptop to an external HDD, my very old Win 10 laptop it takes about 20 mins because that one has a 12 year old so much slower CPU)
    It has a setting to only keep so many backups and so will delete the oldest one automatically as it makes a new one.
    Alternatively (and additionally) it can be set to delete the oldest backups if the drive is running out of space.

You can see there that I have it set to only keep 12 backups, once I had done 12 then as a new one is made the oldest is deleted.
Check whatever backup software you are using, it may have similar settings for how many backups to keep.

Thanks for all the responses and the details. I appreciate the help.

This all started a few weeks ago when I needed to find some older articles I wrote in the mid 2010s. I’m a journalist and keep all my articles in PDF form and my notes and other information in a text format. The issue resulted from a decision I made a few years ago to stop copying these older files to save on space. I wanted to rearrange them so they would be more easily found in the future. I thought CCleaner could help but I then noticed I had way too many backups than I needed. So afater I found the files I needed, I started deleting all the extra backups.

I don’t use any backup software, I just copy and paste everything from my OneDrive to the F: drive, which is an external Seagate hard drive. I seem to recall reading something about Seagate drives would automatically delete older backup files once it reached a certain point but to my knowledge it never has.

As to your comments about these .eml files being compressed or in .zip format, I have never compressed any of these files myself and I don’t think the Seagate drive would be able to do it automatically either. And the .eml files are the only ones I’ve found that can’t be deleted by CCleaner. I believe I’ve deleted hundreds if not thousands of text and photo files without any issues. At least according to what I see on the CCleaner screen when I tell it to delete whatever files are next in line.

I tend to think you may have been on the right track when you said Windows was preventing the deletion of the .eml files. I don’t know why Windows would consider backup .eml files something that shouldn’t be deleted. But it kind of makes the most sense to me. I don’t know how to change whatever settings tells Windows the files must be kept. I am able to manually delete the backup .eml files through Windows File Explorer but finding each of those files and deleting them is way too time consuming, obviously. I can also open a backup .eml file with my email app, which I don’t think I could do if it were a compressed file, right?

Thanks again. I’m curious to see how the Seagate drive looks once I delete all the backup files I can.

Thanks for that explanation.

The fact that you are saving them as copy/paste gives me another idea of what may be happening to prevent the deletion of the eml’s.

I’m guessing that you have changed computers over the years, probably more than once, and some of those copy/paste backups will be from different computers.

Files saved on, and copied from, one computer will have the user account you were using on that computer when you created the file as the ‘Owner’ of the file.
That means that if/when you try to delete that copy from a different computer it may refuse to do so because the user on the new computer does not have ownership of it.

I have come across it myself when copying files between my laptops and/or onto external drives.

If/when it happens to me then I ‘Take Ownership’ of the file, or the whole folder that it is in, and then I have full permissions to delete it or do what I want with it.

You can take ownership through Windows using Properties for the file, but I find that a faff, it isn’t always easy to do, and isn’t always successful.

Instead I add/use a “Take Ownership” option on the right-click context menu in File Explorer.
One click of that and I have full ownership of the file, so full permissions to be able to delete it.
This is from Win 11 where you need to use the ‘More options’ on the context menu to get to the added option. (if you have Win 11 then you’ll know what I mean).
Here I could Take Ownership of the ‘Backups’ folder on my networked drive and everything in it (It’s full of copy/paste backups similar to yours and from more than one computer)

Note - I’m using a fairly new laptop purchased a couple of months ago and I don’t recall having to add it to this particular computer, so I think it may now be included in Win 11 as a standard context menu item? (or maybe I did do it and I’m just getting forgetfull?).

If you don’t see such an option on your context menu then there are plenty of options out there to add one.

This is from the Windows 11 forum but it works in Win 10 as well:
https://www.elevenforum.com/t/add-take-ownership-to-context-menu-in-windows-11.1230/

This is a very simple one from Revo:

As I say there are plenty of others out there, you can also find some stand alone apps to take ownership rather than adding it to your context menu.

I tried using the “take ownership” downloads that automated the Registry changes from two of your suggestions. However, I still can’t delete .eml files.

I read some other advice that said the files link to whatever email app you have on your computer so they suggested restarting my computer but not my email app, then trying to delete the files. I’ll give that a try.

Some sucess!!! I don’t know what might have worked but CCleaner seems to be deleting most of my backup .eml files. I wonder if the files I kept trying to delete (which are still there) might have been created and/or copied from one of my previous PCs or laptops, as you explained? If so, I hoped the “take ownership” procecss might have worked. Apparently not. Maybe I need to try to find them on Windows File Explorer and try to change ownership.

It also occured to me to try deleting these files using my laptop, which I know was the one I used to do at least some of the backups a couple of years ago. I’ll keep that in mind.

OK, it looks like all but three backup .eml files (each of them totaling 28 files) were deleted. I’m thinking they very well could be among the ones I backed up on a previous computer. I’ll give my laptop a try in the next day or so and see if I can get rid of the rest.

FYI, these .eml files always show up at the top of my search results so there may be more further down that I haven’t reached yet. I’ve been deleting tons of photo, text and document files.

It may have been possible that some of the eml’s were still linked/open so closing you email app and restarting was a good suggestion.
(However I doubt that they were open as they were on a backup drive, maybe a tiny possibility that they might have relinked whan you plugged the drive in I suppose).

Good to hear that you are now having some success with your housekeeping, keep plugging away.

Backups, especially ones done manually with a copy/paste of the files can get out of hand if you don’t remember to keep removing the old ones occasionally.
You can end up with hundreds of identical copies of the same files in the different backups. (and all taking up drive space, although we have much bigger drives no than we used to).

You might want to look at using a backup software, they can help keep them under control.

Either one like my Macrium Reflect which will remove the old ‘full backups’ for you automatically.

Or do ‘Incremental backups’ that add any new or changed files to the existing backup without making a duplicate copy of things that haven’t been changed.

Personally I use Macrium to do weekly full image backups on an external drive that is only used for backups, it keeps the last 12 and deletes the oldest one for me when I make a new one.
Plus I also manually copy/paste my Documents and Desktop folders (and occasionally my Pictures folder) onto my networked drive as a second backup of just my files. I have to keep those tidy myself and remember to delete old ones now and again.
I’m not too bothered about possibly losing old stuff, if it’s important and I know I won’t be able to get it/download it again if wanted, then it stays on the computer so will still be in the latest backups if needed. (or gets saved on a different ‘archive’ external drive).

Hello nukecad!

I wanted to give you a quick update on this (more involved than I thought) process and ask a question. I hope you can still help.

I have deleted A LOT of duplicate files with CCleaner and even thought at one point I had finished that portion of my probject. I moved some folders and files to a more appropriate location that’s more easily found. But when I used an app to find and help delete all the empty folders left behind I also found quite a few duplicate files. It was disappointing to realize CCleaner had not found or listed them all after all.

I wonder if CCleaner has any kind of limit on the number of duplicate it finds or has an internal history that somehow makes it miss these duplicate files. Can you let me know?

I have deleted some newly found duplicate files with CCleaner but believe there are still others on my external hard drive that still aren’t showing up.

Any advice or directions on the best course of action are welcome.

I don’t know of any limits on how many duplicates it can find, there will be one but that will be the limit of RAM in your machine so shouldn’t normally be a problem.

What file extensions do the files in question have? If it’s those .eml’s the see the third point below about syncing.
I can think of a few reasons for what you describe, for example:

  • Did you miss selecting any for deletion? I’ve done it myself in the past and higlighted the line rather than selecting the box. (See below about a change coming to selection-for-deletion in Duplicate Finder).
  • Some apps, (particularly the Windows OS itself) need duplicates to work properly, if you remove one then if you are lucky the app will just recreate it again. (If you are unlucky the app will stop workingbecause you have deleted a file it needed).
  • If you have any kind of cloud storage or backup synced, OneDrive, Google Cloud, etc, then the files may have been synced back from the cloud after deletion

So if you think that some may have been missed or been recreated and so you deleted them again, then check if they have come back again - if so then either they are being synced back from the Cloud, or an app (or the Windows OS) is recreating them.

Regarding selecting duplicates for deletion:
We are told that when CCleaner v7 is officially launched (which should be soon) the Duplicate Finder will allow you to select files in bulk to be deleted. eg ‘Keep Older copy/Keep Newer copy’.
It will also show preview thumbnails of image duplicates, and you will be able to choose to delete to delete files permenantly or send them to the RecycleBin.