Remove Program Association from Directory I have a directory, ~/Downloads, which has accidentally become associated with Terminal.app. I would like to remove the association so that the directory can be used with Finder.app again. Thus far, I have investigated extended attributes with xattr, but this isn't the right method to remove associations. How does one fix a problem like this? Please see the illustration below.

This is macOS 10.13.6.

It appears to have been done by copying a Keynote "file" to the directory.

cp -rp file.key/ ~/Downloads/
Looks like you've set the bundle bit on your folder somehow (visible in the Info window: Kind: Package).
Some applications prefer (or create) a package instead of a folder, which can be double clicked to open a whole library folder in an application (iPhoto for example) and maybe to make it harder for the user to mess with its content(?).
To remove the bit run the following command in Terminal (/Applications/Utilities/Terminal.app, or search in Spotlight):

SetFile -a b ~/Downloads


SetFile is part of the command line tools.
Without the command line tools installed, a popup should ask you if you want to download them.  Allow this and try again.