tiggerkenwood

Q: File named .DS_Store on my desktop and won't delete-how to delete?

I recently used AVG Cleaner.  Now I have a file on my desktop called .DS_Store that won't delete.  I tried dragging it to my garbage can and secure erasing it, but it just keeps popping up on my desktop.  Other than that my computer is running just fine.  How do I get rid of this desktop file for good?

MacBook Pro, OS X Mountain Lion (10.8.5), Happened after I upgraded to Maveri

Posted on Jun 16, 2014 8:57 PM

Close

Q: File named .DS_Store on my desktop and won't delete-how to delete?

  • All replies
  • Helpful answers

  • by Kappy,

    Kappy Kappy Jun 16, 2014 9:03 PM in response to tiggerkenwood
    Level 10 (271,133 points)
    Desktops
    Jun 16, 2014 9:03 PM in response to tiggerkenwood

    It's an invisible file that should not appear. It cannot be deleted. Try this:

     

    Open Terminal in the Utilities folder. At the prompt enter or paste:

     

         chflags hidden ~/Desktop/.DS_Store

     

    Press RETURN. See if that makes it disappear. If you get an error about not having privileges then place "sudo" in front of the command line: sudo chflags hidden ~/Desktop/.DS_Store

  • by tiggerkenwood,Helpful

    tiggerkenwood tiggerkenwood Jun 16, 2014 9:07 PM in response to tiggerkenwood
    Level 1 (9 points)
    Notebooks
    Jun 16, 2014 9:07 PM in response to tiggerkenwood

    I found this on another site and put the following code to hide files in my terminal:

     

    defaults write com.apple.finder AppleShowAllFiles FALSE

     

    killall Finder

     

     

    It worked.  I can no longer see the file on my desktop.  However, now I am wondering how these hidden files became viewable in the first place.  I didn't do it.  I don't know how.

  • by Kappy,

    Kappy Kappy Jun 16, 2014 9:15 PM in response to tiggerkenwood
    Level 10 (271,133 points)
    Desktops
    Jun 16, 2014 9:15 PM in response to tiggerkenwood

    That is a global command affecting all hidden files. Mine affects a single file. Had you said that you had lots of files on the Desktop or elsewhere with the "." preceding the name, then I would have known you needed the global setting.

     

    It was most likely caused by the AVG software that you should not have installed. You should uninstall the AVG software because it is not needed, can possibly cause problems such as this one, and can slow down the computer.

     

    Helpful Links Regarding Malware Protection

     

    An excellent link to read is Tom Reed's Mac Malware Guide.

    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.

    See these Apple articles:

     

              Mac OS X Snow Leopard and malware detection

              OS X Lion- Protect your Mac from malware

              OS X Mountain Lion- Protect your Mac from malware

              About file quarantine in OS X

     

    If you require anti-virus protection Thomas Reed recommends using Dr.Web Light from the App Store. It's free, and since it's from the App Store, it won't destabilize the system. If you prefer one of the better known commercial products, then Thomas recommends using Sophos.(Thank you to Thomas Reed for these recommendations.) If you already use Sophos, then be aware of this if you are using Mavericks: OS X Mavericks- Sophos Anti-Virus on-access scanner versions 8.0 - 9.1 may cause unexpected restarts

     

    From user Joe Bailey comes this equally useful advice:

     

    The facts are:

     

    1. There is no anti-malware software that can detect 100% of the malware out there.

    2. There is no anti-malware that can detect anything targeting the Mac because there

         is no Mac malware in the wild, and therefore, no "signatures" to detect.

    3. The very best way to prevent the most attacks is for you as the user to be aware that

         the most successful malware attacks rely on very sophisticated social engineering

         techniques preying on human avarice, ****, and fear.

    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on

        your computer is intended to entice you to install their malware thinking it is a

        protection against malware.

    5. Some of the anti-malware products on the market are worse than the malware

        from which they purport to protect you.

    6. Be cautious where you go on the internet.

    7. Only download anything from sites you know are safe.

    8. Avoid links you receive in email, always be suspicious even if you get something

        you think is from a friend, but you were not expecting.

    9. If there is any question in your mind, then assume it is malware.

  • by CMonique510,

    CMonique510 CMonique510 Nov 12, 2014 7:42 PM in response to tiggerkenwood
    Level 1 (4 points)
    Nov 12, 2014 7:42 PM in response to tiggerkenwood

    Tried this and it worked thanks

  • by Greengecko,

    Greengecko Greengecko Feb 1, 2015 9:23 AM in response to tiggerkenwood
    Level 1 (0 points)
    Feb 1, 2015 9:23 AM in response to tiggerkenwood

    Your suggestions worked, thanks!

    ====

    defaults write com.apple.finder AppleShowAllFiles FALSE

     

    killall Finder

  • by monkeyhead0305,

    monkeyhead0305 monkeyhead0305 Sep 4, 2015 8:57 AM in response to Kappy
    Level 1 (0 points)
    Sep 4, 2015 8:57 AM in response to Kappy

    Hi Kappy, I have the same problem as OP, but before I use Terminal and enter the command you listed to remove .DS_Store from my desktop, I noticed that the .DS_Store file is listed under Launchagents

     

    My question, if I delete .DS_Store from Launchagents, would this delete the file completely? I don't want to delete the file, I simply don't want it to keep reappearing on my desktop. I'm guessing that if the .DS_Store file is under Launchagent, maybe that's the reason it on my desktop?

     

    Thanks

  • by Öposhé,

    Öposhé Öposhé Apr 22, 2016 5:20 AM in response to tiggerkenwood
    Level 1 (8 points)
    Apr 22, 2016 5:20 AM in response to tiggerkenwood

    this performed MAGIC!! phew......

  • by pkeel78703,

    pkeel78703 pkeel78703 May 8, 2016 4:02 PM in response to tiggerkenwood
    Level 1 (4 points)
    May 8, 2016 4:02 PM in response to tiggerkenwood

    Thank you!  This was driving me crazy.