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 🙂

Comments [30]

  1. 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?

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

    SetFile -a b folderPath

    see man pages for SetFile, GetFileInfo

  3. 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…

  4. 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…

  5. Easier way:

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

    SetFile -a b ~/Destkop

    (or whatever the bundled folder is)

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

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

  8. 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.

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

  10. 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.

  11. Thanks! iPhoto had transformed my Desktop into a package… thanks for saving me!! 🙂

  12. 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!!!!

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


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

  16. 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.

  17. 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?

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

  19. The suggested software is rubbish.

    Paste the following into terminal.

    xattr -d ~/Desktop

Leave a Reply

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