How to Fix a Mac Folder That’s Turned Into a Package (macOS 26 Tahoe)

Ben Stockton
·
6 min read

Switching to Mac is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

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.

Finder window showing a folder named with a .app extension displayed as an application bundle icon rather than a standard folder icon, with the item selected to show its name in the status bar

Fix It in Finder

This handles the most common cause: the folder has a bundle extension it shouldn’t have.

  1. In Finder, locate the folder that’s showing up as a package.
  2. Right-click it and choose Get Info.
Finder right-click contextual menu on a folder displayed as a bundle/package, with Get Info highlighted
  1. Click the disclosure arrow next to Name & Extension to expand that section.
  2. 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.
  3. Press Return to save.
Finder Get Info window with the Name & Extension section expanded, showing a folder name ending in .app with the extension portion selected for deletion
  1. When Finder asks you to confirm, click Remove.
macOS sheet dialog asking to confirm removing the extension from a folder name, with the Remove button highlighted

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.

  1. Open Terminal (Cmd + Space, type Terminal, press Return).
  2. Navigate to the directory containing the folder:
cd /path/to/parent/directory
  1. Rename the folder to remove the bundle extension:
mv "MyFolder.app" "MyFolder"
  1. 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.

Terminal window showing the mv command renaming "MyFolder.app" to "MyFolder", followed by ls -ld output showing drwx permissions confirming the item is a directory

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:

  1. Open Terminal and navigate to the parent directory of your folder:
cd /path/to/parent
  1. Check whether the bundle flag is set. Replace foldername with 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.

Terminal window showing the getfileinfo -aB command run against a folder name, with the output returning 1 indicating the has bundle attribute is set
  1. Remove the flag:
setfile -a b foldername
  1. Run getfileinfo -aB foldername again. A 0 confirms the flag has been cleared.
Terminal window showing the setfile -a b command followed by a second getfileinfo -aB call returning 0, confirming the has bundle attribute has been removed

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

  1. Open Terminal and mount the disk image as a virtual drive:
hdiutil attach /path/to/file.dmg
Terminal window showing the hdiutil attach command with a .dmg file path, with output showing the mounted volume name and path under /Volumes
  1. 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.

Terminal window showing the cp -r command copying from a mounted DMG volume path under /Volumes to a local destination folder
  1. 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.

Terminal window showing hdiutil info output with device identifiers and mounted volume names, followed by the hdiutil detach command targeting the correct device identifier

PKG Files

To extract the contents of a .pkg installer without running it:

pkgutil --expand /path/to/file.pkg /path/to/output-folder
Terminal window showing the pkgutil --expand command with a .pkg source file path and a destination output folder path

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.