How to find (and delete) all "Thumbs.db" from your system

Windows has many things that annoy me in its operation, I admit ... I am not even a fan of that OS. Just one of those things that bothers me is that it creates that tedious file «thumbs.db»In every damn folder ¬_¬

Although I do not use Windows, when I copy a folder from a friend or something from work, I also take with me the content of my interest, that damn file thumbs.db

Just a few moments ago I walked into a (Nightwish video clips) and there it was ... and obviously, I will surely have that file repeated in many more directories, so ... how to delete them all at once? 😀

First let's see what they are and in which folder on our system they are, that is, where is each Thumbs.db in our system. To do this, open a terminal and write the following in it:

find $HOME -iname Thumbs.db

This will show in the terminal the location of each of these files in our Home (or personal folder), I show you a screenshot of how it looks in my case:

As you can see there are several, to delete ALL of them we simply add to the end of the previous line: -delete

In other words, we would have:

find $HOME -iname Thumbs.db -delete

And BINGO !, there are none left *-*

That line has a simple meaning:

  1. find $ HOME - »Search my home
  2. -iname "Thumbs.db" - »Search specifically for" Thumbs.db "and ignore upper or lower case
  3. -delete - »Delete what you just showed / found

How to achieve it WITHOUT using the terminal?

Yes, although I am a big fan of the terminal, I know that there are users who fear it, and prefer to use graphic applications to achieve things 😉

To search all thumbs.db using a graphical application, just open your browser, in KDE it is KFind, they tell him to look in your personal folder, specifically to look for Thumbs.db ... here is a screenshot of how it turned out for me:

Once you find everything, select all the lines (results) and right-click on any of them, then click on the delete or delete option ... and that's it 😀

And nothing more to add.

Here is how to remove all thumbs.db of your system, either using a single command, or for those who like graphical applications, using the search engine of your system.

regards


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Leo said

    Good Tip, it helps me for other things. Thank you!!!

  2.   jorgemanjarrezlerma said

    Thanks for the information since every time I have to do something with a backup of a Windows computer, the truth involves a lot of work having to be specifying what to save and what not. This way will help me to remove them by mounting the drive by SMB and running the cleanup and thus have backed up what really matters.

  3.   Carlos-Xfce said

    How I hate those wretched files!

    I used the code and nothing came out. But I'm not claiming victory: my 500 Gb hard drive, where I keep my old files and backup everything, there must be hundreds of those crap ... sniff ...

  4.   elendilnarsil said

    I thought I was the only one bothered by these files. thanks for the info. in the afternoon I will take care of cleaning the system.

    1.    Juan Carlos said

      Heh, one of the most annoying things Windows has. Extend the search to your pendrive's and the memory of your phones.

  5.   giskard said

    What bothers me the most about Winbugs are the files that are in c: \ windows and their subdirectories: p

    1.    Leo said

      The XD folder bothers me directly

  6.   cerberus said

    Thanks tron, apply to the home directory and there was no Thumbs.db but there was a webo on the external hard drive, and now there are none left ... hehehe

  7.   Javier said

    Great! A piece of information that is useful and also easy to implement. Slds.

    1.    KZKG ^ Gaara said

      Thanks to you for the comment 🙂

  8.   truko22 said

    I keep it → find $ HOME -iname Thumbs.db -delete I see a lot of potential for a scripts ^ __ ^ thank you very much 😀

    1.    KZKG ^ Gaara said

      hahahahahaha yes? 😀

  9.   tahed said

    Check the following commands and tell me if they are useful to you:

    Copy preserving the structure
    find / media / disk / folder / -name * .pdf | sed 's / ^ / »/' | sed 's / $ / »/' | awk '{print «cp –parents« $ 0 ″ \ »/ media / disk / destination-folder / \» «}' | sh

    copy and delete
    find / media / disk / folder / -name * .pdf | sed 's / ^ / »/' | sed 's / $ / »/' | awk '{print «cp –parents« $ 0 ″ \ »/ media / disk / destination-folder / \» && rm «$ 0» «}' | sh

    Move Preserving File Structure using command (mv)
    find / media / disk / folder / -name * .pdf | sed 's / ^ / »/' | sed 's / $ / »/' | awk '{print "mkdir -p \" / media / disk / destination-folder / \ `dirname" $ ​​0 ″ "\" && mv "$ 0" \ "/ media / disk / destination-folder \` dirname "$ 0 ″` \ »«} '| sh

    1.    KZKG ^ Gaara said

      Uff ... thirst I still don't understand it at all 🙁
      cut, grep and awk are wonderful, however since it works with regular expressions, it is difficult for me to understand.

  10.   Stif said

    Capo, you are a crazy capo!

    Do you know the times those damn little files screwed up my life with the Audacious? Because thanks to these files, Audacious crashed and closed. Although I already eliminated the majority that screwed me, I am going to pass the command to see what happens.

    Thank you!!

  11.   Luis said

    good evening what is Thumbs.db? What does windows use it for? What function do you do? Please explain it to me I also get it but when the virus kills it and that appears in the folder of the photo or images always there and I think that another file I do not remember so that deletes the photo or images or website that one saves

    1.    Daniel said

      In short:

      It is not a virus but a file that is automatically generated when we go to the thumbnail view in any folder (and if we have enabled the option to show hidden files and folders).

      This file stores the data of these thumbnails of the images so that the next time we open the folder in that way, the images will load faster. Consequently, the more images we have in a folder, the larger this file will be.

      Here the source: http://www.blogoff.es/2006/04/18/el-archivo-thumbsdb/

      1.    Windousian said

        When I wrote my answer, your message was not visible. I guess I was waiting for restraint. Now my comment sounds redundant :-P.

    2.    Windousian said

      Deleting that file removes the thumbnails from the preview in the folder that contains it. Nothing happens to the images.

    3.    KZKG ^ Gaara said

      Surely the antivirus eliminates desktop.ini autorun.inf and thumbs.db not? 🙂
      - desktop.ini is the file that saves the configuration of that folder, such as the background you put in it, etc.
      - autorun.inf is the file that specifies that when you enter the folder (or external device) X .exe is automatically executed, and some other data.
      - thumbs.db ... well, this one has already been explained 😀

  12.   helena_ryuu said

    good advice, I also don't like those files, it's like the stamp of «muaaajajaja came from windoze muuuajajaja»… .. or something like that, it's the same as with the damned .DS_store…. how I hate them (¬_¬) xDDD

    1.    Windousian said

      The GNU / Linux seal is ".directory".

      1.    KZKG ^ Gaara said

        In KDE it creates this file, yes, but ... other environments too?

        1.    Windousian said

          It is supposed to be a freedesktop.org standard.

    2.    KZKG ^ Gaara said

      JAJAJAJAJAJAJA yes, it is like that trace or mark (stain) that remains reminding us that X folder came to us from Windows, god as I hate them HAHA.

      In fact, I am thinking of programming a script that when a USB device is mounted, it automatically searches for all the thumbs.db on that USB and deletes them, so when I copy something from a USB, I make sure I never copy a thumbs again .db… JUAZ JUAZ 😀

  13.   yefb said

    Well, KDE applications also create .db files, for example for Thumbnails, Digikam creates these files (thumbnails-digikam.db), that if you use Dolphin you will not see them (Obviously), but if you open the directory for example with Thunar ( As in my case) it is clear; it also creates a "digikam4.db" file. And to this example are added others that I do not have at hand right now.

    1.    KZKG ^ Gaara said

      I don't actually use DigiKam, is there not an option in the application that you can tell it to generate the .db in a specific folder or something like that? 🙂

      1.    yefb said

        Well, I really don't know. What happens is that even using XFCE, there are certain KDE applications that I prefer to use (Like Digikam, Krita, Kdenlive, etc), but I don't usually see much in their configurations, I just install and use: D.

        Greetings colleague!

        1.    KZKG ^ Gaara said

          Oh yeah yeah 😀
          regards

  14.   like said

    Hello KZKGaara. Very good post. I have a few Thumbs.db in a Subversion SVN repository and I wish I could clean up a local copy of these files.

    Here in Subversion we delete something with the command:
    svn delete un_file

    I would like to be able to apply the svn delete with each of the files listed in the command output:
    find / address / folder -iname Thumbs.db

    In order to clean a local copy of an SVN repo that has a few Thumbs.db, because otherwise you would have to do an svn delete for each file, the ideal would be in a single command to link the svn delete with find so that at the same time that finds it deletes it from SVN with svn delete.
    If you can help me please leave the suggestion here. Thanks a lot.
    Greetings.

    1.    KZKG ^ Gaara said

      The command that would help you would be xargs 😉
      For example:
      find /direccion/carpeta/ -iname Thumbs.db | xargs svn delete

      This I have not tested, so I do not guarantee that it works 100%, first test in some way that you can not fuck sensitive information 😉

      What xargs does is execute the command on the right, passing it as the 1st parameter the output that has been generated before 😉

      1.    Hugo said

        Better to use the null character as a terminator, so that unpleasant things do not happen with directories or files that contain spaces or other strange characters in the name. I would do it like this:

        find /direccion/carpeta/ -type f -iname "thumbs.db" -print0 | xargs -0 svn delete

  15.   Thirteen said

    Although I've only had windows on Virtualbox for a long time, I came across too many "thumbs.db".

    Thanks for the articles.

    Regards Gaara

    1.    KZKG ^ Gaara said

      Thanks to you for commenting 🙂

  16.   hexborg said

    I was not aware of the -delete option to find. Very useful also to delete the .DSStore that comes from Mac OS X.

  17.   debish said

    Good note. The power of find is incalculable 🙂

    1.    KZKG ^ Gaara said

      Thank you
      Yes, I plan to do another post about find soon, with another of its parameters that is really useful to me haha.

  18.   cryotope said

    Contribution is appreciated.
    Personally, I prefer to use the console (rather the emulator) for this type of task, you just have to worry about writing the commands well, if you have any questions you can use man or info and the speed is slightly higher than doing them with a graphical interface.

    I hate those damn files too.

    Contribution is appreciated.

  19.   Samano said

    Another method is also using BleachBit and checking in preferences find and delete thumbs.db. It's that easy and Linux Salu2

  20.   eliotime3000 said

    The "Thumbs.db" file is a file that works as a kind of cache in which it stores thumbnails of file previews (images, song covers, slides, Office documents ...) and loads them faster.

    If that file is deleted, Windows stores that file back so that the previews load without delay (in my opinion, that would be a waste of time and it would be more feasible for them to work with the ext4 system to avoid those problems).

  21.   Germaine said

    I use the terminal because it is much easier to remove not only the Thumb.db but also the encryptables but I use other commands like ROOT:

    # find / -type f -name Thumbs.db -exec rm -f {};

    # find / -type f -name Thumbs.db: encryptable -exec rm -f {};

  22.   Alberto Freide said

    Very good article!

    I would just add: On Windows systems, you can avoid creating the thumbs.db with a GPO or with a registry key.

    http://www.sysadmit.com/2016/11/gpo-evitar-creacion-thumbsdb-en-red.html