Media Sync Log - problems with removed media files

Hello.
When i do a media sync on anki at the end of the day on some days, the sync says that there is 1 media file removed. I havent removed any cards or media files manually that i know of. I’m concered that Anki is deleting my media files for some unknown reason?
The last time it happened was last night and the media sync was taking a very long time adn then it said that there was ‘1 removed.’ It only ever removes 1 file. I have not made any changes to my decks on other devices or anki web - i never use any devices except for my desktop app.
if anyone is able to give me some info on why this is happening that would be so helpful
thankyou!

If your devices were out of sync at some point, it’s possible the same file is getting deleted and restored each time. (Sort of like Anki is trying to save you from yourself.)

Have you run a Check Media lately? I would recommend – sync – Check Media – get rid of anything unused – Check Media again to empty the trash – force a one-way sync to AnkiWeb. See if that stops this in the future.

Thankyou so much from your reply!
I did have a look at check media but on reviewing the files in the ‘unused’ section it seems like some of the images definiety are in fact used on my cards, so i am hesitant to delete them just in case. im not sure why anki has put them in unused but at least some of them still seem to be in use.
Overall, i dont really mind that the media sync seems to be removing 1 file as long as anki isnt slowly deleting all my media (like if it was just one file being restored and deleted like you mentioned then i dont mind)
I wonder is there is a way that i can check what media is being removed? or is there a log of all the media anki has deleted in the past?
Thankyou so much again for your reply :slight_smile:

What’s happening on sync is Anki making your collection.media on this device match the collection.media on AnkiWeb. It’s not looking at whether the files are used or not (like a Check Media does), and in my experience it will happily keep syncing files you don’t need. So I don’t think there’s much chance of this sync activity deleting files you don’t expect – it’s only deleting files that don’t exist on the other end.

But you and AnkiWeb are both wasting time and space on this one file, so it’s worth it to take care of it.

But even if you don’t want to deal with that one file – let’s see if we can fix this, because it’s not normal. Anki is searching the text of your notes collection to find mentions of those files, so if they’re actually in notes, Anki shouldn’t be missing that. But if they are similarly-named duplicates, they are wasting space for you and AnkiWeb. How many unused files are we talking about here?

The safety valve for “unused” files is that they are moved first to a trash folder, which can restore them from or you have to manually empty. So again, it’s pretty protected from data loss.

One way to check on those files is copy the contents of that window into a text file, and start searching for those files in the the Browse window to see what notes they show up on. If it’s a lot of files – the faster way is to let Anki “delete” all of them (which just moves them to a different folder) and then go look at your collection in Browse to see what’s missing.
image

Okay thanks,
I have quite a big collection and there are 171 unused files that anki has picked up. I’m unsure why anki wouldnt be picking them up if they are actually on my cards?
from what I’ve seen so far Im predicting that there are a lot of cards that actually use the unused files. I would be hesitant to delete them all and then see whats missing because my collection is really quite large and I would reckon I wouldn’t actually notice which ones are missing or not.
Is there a way that i can know if they are duplicates or not?
do you know maybe why anki would be missing that those files are used in the first place?
apologies if im not quite understadiing completely,
thanks again

That’s fine if you don’t want to delete them through that function yet. The other way to do it is to copy each filename, and search for it in your collection yourself (in the Browse window, as I mentioned before).

If you find any that are actually being used on a note, then we can worry about what’s going on with Anki.

1 Like

One guess as to the “1 removed”: perhaps something like an add-on is writing a file there, then deleting it later after it’s already been synced.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.