If a folder in Finder is showing up as an app or installer package, and double-clicking does nothing useful, macOS is treating it as a bundle and hiding the contents. It looks alarming. It’s usually a fast fix.
What’s Going On
Packages (also called bundles) are folders that macOS presents as single files. Applications, .pkg installers, Logic Pro sessions, and Photos libraries all work this way. Finder identifies them by their file extension, .app, .pkg, .bundle, .band, .key, .pages or by a metadata flag called the “has bundle” attribute.
A regular folder can accidentally pick up the same treatment if it acquires a bundle extension (from a bad rename, a file transfer, or a build process) or if the bundle attribute flag gets written to it by a third-party tool or a failed write operation. Either way, Finder stops showing the folder contents and treats the whole thing as a single file.
Fix It in Finder
This handles the most common cause: the folder has a bundle extension it shouldn’t have.
- In Finder, locate the folder that’s showing up as a package.
- Right-click it and choose Get Info.
- Click the disclosure arrow next to Name & Extension to expand that section.
- Look at the filename in the name field. If it ends with
.app,.pkg,.bundle,.key,.pages, or any other bundle extension, delete the extension. - Press
Returnto save.
- When Finder asks you to confirm, click Remove.
The folder goes back to behaving like a normal folder. Double-click and you’re in.
Before you remove any extension: Check Get Info > Kind first. It’ll say “Application” if you’re looking at a real app. Stripping .app from an actual application breaks it. The app won’t launch after that.
Fix It in Terminal
Useful when you have multiple folders to rename at once, or if you prefer the command line.
- Open Terminal (
Cmd + Space, type Terminal, pressReturn). - Navigate to the directory containing the folder:
cd /path/to/parent/directory
- Rename the folder to remove the bundle extension:
mv "MyFolder.app" "MyFolder"
- Confirm it’s now a directory:
ls -ld MyFolder
Output starting with drwx confirms it’s a directory. Finder updates the display on its own.
To strip .app from every item in the current folder at once:
for f in *.app; do mv "$f" "${f%.app}"; done
Replace .app with whatever extension you’re removing.
Clear the “Has Bundle” Attribute Flag
If removing the extension didn’t solve it, or the folder has no unusual extension, the “has bundle” attribute flag may be set in its metadata. Clearing it requires Xcode Command Line Tools, since getfileinfo and setfile don’t ship with macOS by default.
Install the tools if you haven’t already:
xcode-select --install
Then:
- Open Terminal and navigate to the parent directory of your folder:
cd /path/to/parent
- Check whether the bundle flag is set. Replace
foldernamewith your folder’s actual name:
getfileinfo -aB foldername
A return value of 1 means the flag is set. 0 means it isn’t. The extension is likely the real cause, not this flag.
- Remove the flag:
setfile -a b foldername
- Run
getfileinfo -aB foldernameagain. A0confirms the flag has been cleared.
Go back to Finder and try opening the folder. It should behave like a regular directory.
Viewing a Package’s Contents Without Changing It
If the bundle is legitimate (an actual app, a Photos library, a Logic Pro session) and you want to look inside without altering it, right-click it in Finder and choose Show Package Contents. A new Finder window opens showing the internal folder structure.
From Terminal, you can cd into any bundle as if it were a directory:
cd "/Applications/Safari.app"
ls
Bundles are ordinary directories at the filesystem level. Finder’s single-file presentation is a display layer over that.
A warning about document bundles: Photos libraries, Logic Pro sessions, and Final Cut Pro libraries store their internal files in a precise structure. Opening them with Show Package Contents and editing files directly is a reliable way to corrupt the library. Use the app that owns the library to manage its contents.
Extracting Contents from DMG and PKG Files
These methods are for actual installer packages and disk images, not folders that accidentally became packages.
DMG Files
- Open Terminal and mount the disk image as a virtual drive:
hdiutil attach /path/to/file.dmg
- Copy the contents to a folder of your choice:
cp -r /Volumes/VolumeName/ /Users/yourusername/DestinationFolder
Replace VolumeName with the actual volume name from the hdiutil attach output.
- Get the device identifier, then unmount:
hdiutil info
hdiutil detach /dev/diskX
Replace /dev/diskX with the identifier shown for your volume in the hdiutil info output.
PKG Files
To extract the contents of a .pkg installer without running it:
pkgutil --expand /path/to/file.pkg /path/to/output-folder
The contents land in the output folder you specified. PKG payloads are often compressed inside the expanded structure. If you see a Payload file, you may need to unpack it further with cpio, depending on the installer format.
Troubleshooting
The folder still looks like a package after renaming
Log out and back in. Finder doesn’t always refresh icon state immediately after a Terminal rename. If that doesn’t help, run the getfileinfo and setfile steps above to check the attribute flag.
“Show Package Contents” isn’t in the right-click menu Finder only shows that option for items it recognizes as bundles. If it’s missing, the item may be a flat file (a ZIP archive, a disk image, or a plain document) rather than a bundle directory.
The folder is on an external hard drive or iCloud Drive and still won’t open after the fix Check read/write permissions in Get Info > Sharing & Permissions, and verify sync status in System Settings > Apple ID > iCloud. Slow iCloud sync can look a lot like a package problem.
You removed .app from a real app and now it won’t launch
Right-click the app in Finder, choose Get Info > Name & Extension, type .app back onto the name, and press Return. The app should launch normally.
Once the extension is removed or the attribute cleared, the problem’s solved. Your folder opens like any other directory, and the contents are back where they should be. If files look missing after the fix, check inside the subfolders. Bundle structure nests content one or two levels deep, so what you’re after may be sitting under a Contents or Resources folder.
Keeping regular backups on an external SSD or through Time Machine means you have a fallback if something goes sideways during the fix.