How to Find and Remove @eaDir Directories on Synology NAS

Posted in Linux

If you’ve installed theΒ MediaServer or PhotoStation packages on your Synology NAS you’ve probably noticed @eaDir directories popping up everywhere. These are “hidden” folders equivalent to thumbs.db on Windows where the package stores thumbnail files associated with iTunes support. If you’re not using iTunes you don’t need these directories. You can remove them in two steps:

Disable the Service Creating Them

SSH in as root and run the following:

cd /usr/syno/etc.defaults/rc.d/
chmod 000 S66fileindexd.sh S66synoindexd.sh S77synomkthumbd.sh S88synomkflvd.sh S99iTunes.sh

Remove the existing directories

Again in SSH use the following to locate them (cd to your volume root first):

find . -type d -name "@eaDir"

and if you’re feeling adventurous you can automatically delete them like so:

find . -type d -name "@eaDir" -print0 | xargs -0 rm -rf
  • coops

    Out-freaking standing…

    Running a WD TV Live streamer from my Synology NAS, and was finding all those irritating @eaDir directories everywhere. Ugly, and now banished thanks to the above.

    Note the above first step is truncated as i see it on screen, and where it says “S88synom” should be “S88synomflvd.sh”, but if you’re doing this through ssh you probably worked that out already…

    Thanks again.

    • flynsarmy

      You mean here? http://i.imgur.com/5rEAmOq.png Doesn’t look truncated to me.

      • coops

        thanks – i didn’t see the S99etc at the end either… viewing the post on an ipad using Atomic browser, the ‘boxed’ part with your instructions gets truncated.

        Bloody marvellous, unix though – i’d remembered the old tab trick to save typing and typing errors.

        Thanks again.

  • Wybo Dekker

    I did the trck, and it worked. However: after that all file access to the NAS had become EXTREMELY slow; for example, copying a 63K file from my pc to the NAS now takes 32 seconds. I turned back the chmod above, but that did not help. Any idea how to undo things?

  • iv0

    Thank you very much for this tutorial, very much appreciated. The names of services seem to be different in DSM 5.0, but there is now configurable “Media Library” item in the Control Panel. I tried to disable everything there, so far it looks like new @eaDir folders are not popping out πŸ™‚

  • stu

    find . -type d -name “@eaDir” -print0 | xargs -0 rm -rf

    is a gratuitously long form of

    find . -type d -name “@eaDir” -delete

    • flynsarmy

      It’s longer for sure but I wouldn’t exactly call it gratuitously longer. No need to be elitist, we’re all trying to help each other here πŸ™‚

      Anyway thanks for the tip!

    • Ryan

      if the dir is non empty that won’t work. however the longer form using rm -rf properly does…

  • mark


    find . -type d -name “@eaDir” -delete

    does not work. It gives the error: Directory not empty

  • Vic

    Good stuff!, thanks for this!

    I was enabling my backup and I saw that bunch of directories. I figured it was some kind of inexing for the photos (which I was backing up), but this script made it easy for me to get rid of them. Next I have disabled inexing on the media library