How to Restore a Folder that has Turned into a Package in OS X

Earlier this week I accidentally copied something to my Desktop that caused the Desktop itself to no longer be recognized by OS X as a folder. It turned into a “package” instead. All of the icons on my Desktop disappeared and the link to my Desktop from the Finder’s sidebar no longer worked. Here’s how I fixed the problem.

The first action that got my attention was when I clicked the Desktop link from the PLACES section of the Finder sidebar, and got the error There is no default application to open the specified document “Desktop”.

os x error messageWhen I tried to access my Desktop in a different manner, by selecting my home folder and then Desktop from there, the Preview: pane displayed my Desktop “kind” as a package instead of displaying the contents of what should have been a folder. By clicking the More info… button…

an os x package that should be a folder

… I was presented with the full information for the Desktop. And sure enough, OS X believed it to be a package, not a a folder. It wanted to know what to open “package” files with (the Open with: menu).

desktop as a package information screenThe solution: download and install File Matey. To install, just open the downloaded zip file, and drag File Matey to your Applications folder. Launch it from there, and click the Later button.

file matey opening windowRight away, File Matey will ask you to select an object to analyze and work on. Navigate to the folder that OS X thinks is a package. For me, I had to go to my home folder and select Desktop that way – selecting Desktop from the left shortcut pane resulted in another error.

select an object for file matey to work withIn the Attributes: menu, the Desktop had the Has Bundle bit option selected. Remove that check. Then click Save.

main file matey windowRestart Finder by opening a Terminal (Applications -> Utilities -> Terminal) and enter the command: killall Finder

os x terminal restarting finderNow Finder and OS X once again recognize the Desktop folder as a folder, instead of a package. The shortcut link in the Finder window once again works, and all of the items displayed on my Desktop re-appeared.

finder displaying desktop contentsThat’s it! Hope it helps :)

More posts from the OS X Category


Change Computer Hostname in OS X Lion


8 Very Useful OS X Keyboard Shortcuts


Creating Aliases in Mac OS X

img00a (2)

How to Format a Drive or Partition with the HFS+ File System

  1. Javier says:

    Thank You, it was just what i needed!!!

  2. Jean-Denis Muys says:

    Except that you haven't found the cause:

    how and why has that bundle bit been turned on?

    why do you think it won't happen again?

  3. blacksheep says:

    Thanks. You can also do this from the command line with:

    SetFile -a b folderPath

    see man pages for SetFile, GetFileInfo

  4. Ficanas says:

    You can use setfile -a b "folder"/


  5. 10ktrav says:

    YES!!! thanks, this was a quick fix. I think I messed things up originally by dragging over library files into my Address Book and a couple of other applications from a hard drive that I had recovered data stored on… my HD crashed last week so I've been getting my new disk up to speed…

  6. Macs Suck says:

    Macs need an attrib command (or something to change all attributes, not just chmod) & a Properties window (Get Info is almost never useful)…you shouldn't need shitware (shareware/payware) to fix an issue…

  7. Thomas says:

    Brilliant- thank you so much!

  8. David says:

    Easier way:

    (If you have Apple Developer Tools installed… which every Mac user should):

    SetFile -a b ~/Destkop

    (or whatever the bundled folder is)

  9. Sam Hamann says:


  10. Roger Mann says:

    I have been trying to fix this problem since March. Thank you so much

  11. Ulf says:

    Easy as pie with the Developer Tools installed, not so nice if you haven’t. Thanks anyway for the hint with File Matey :-).

  12. Frank says:

    You can fix this with no tools at all.

    Create a new folder, open the package by option-clicking and choosing "Show package contents" and moving the contents to the new folder. I had more trouble deleting the empty package because it was the user's Documents folder and the Finder doesn't let you delete that without a fight.

  13. ulyxes says:

    Awesome, fixed my problem right away! Thanks so much =)

  14. Bob says:

    FINALLY!!! This has been driving me crazy for over a month. Thank You!!!

  15. TomS says:

    Thanks. What a pain. And thank god Google could find you!

  16. John says:

    Thank you it worked well.

  17. Quentin says:

    Thank goodness someone worked it out – I could see the Desktop had become a PACKAGE but didn't know what to do after that.

    Thanks a heap from Australia.

  18. chiara says:

    Thanks! iPhoto had transformed my Desktop into a package… thanks for saving me!! :)

  19. Jon says:

    Thanks so much!

  20. opie says:

    Thanx heeps mate sorted it straight out :)

  21. Paul J says:

    Ok, got the package to turn into a folder, thank you. BUT, somewhere along the way I redirected the desktop icon to terminal and can’t figure out how to undo that, or direct it back to finder. HELP!!!!

  22. Bill E says:

    Thanks tons…my Desktop folder turned into a package months ago and I finally found your solution. Worked like a charm.

  23. Bruce NJ says:


  24. jojo honeybean says:

    THANK YOU!!!! Solved what the so-called “Genius Bar” had NO CLUE about.

  25. N Santana says:

    I would recommend not downloading any software at all, as suggested by others in this thread. If you use terminal you can change file extension of the item, as I’m assuming that packages have file extensions that are hidden in the OSX GUI but that you can see in terminal. This is just a theory since I haven’t seen the package file in terminal but:

    1. Open Terminal

    2. type “pwd” to see what directory you are in when you open Terminal so you can orient yourself in your system

    3. to see what contents are in your present directory, further orienting yourself, type “ls”

    4. Move the offending file into the directory you are in as shown in terminal or if you are comfortable moving around in the shell, just maneuver over to where your file is using change directory “cd” commands. Once you are sure you are in the correct directory, type “mv” then the name of your file e.g. if it is say example.fil then type that and finally enter the name again without the file extension and the item will be a folder again. Your command in terminal, using my example fillers would be: “mv example.fil example”. What you will end up with is the “example” folder in the place you left it.

  26. Karl I says:

    Another solution you can use is the Terminal command:

    xattr -d ~/Desktop

    This will reset the bundle bit on the Desktop folder.

    Gleaned from poster V.K. on this Apple thread:

    Good luck and happy computing, everyone!

  27. tamie says:

    I downloaded iExplorer but i can not open it. I get the message the application iExplorer quit unexpectedly. Clicked relaunch & got the same. Now what do I do?

  28. Zuno says:

    Thanks!!! Thanks, helped me to fix my desktop, which has not worked for months …

  29. bluntbutterknives says:

    The suggested software is rubbish.

    Paste the following into terminal.

    xattr -d ~/Desktop

Leave a Reply