8

I am trying to install an app in OSX. But I am getting the below error

The item “.VolumeIcon.icns” can’t be replaced because it’s invisible.

When I get into the Applications, I'm able to see .VolumeIcon.icns as a hidden item. I also tried deleting it, however it is again created by the app(by default it is hidden). Can you guide me how to resolve this error?

3
  • Try using the rm -rf command in Terminal, that should remove difficult files. Commented Aug 28, 2014 at 13:53
  • What is the app that you are trying to install and what is giving the error? (Finder? AppleScript?)
    – grg
    Commented Aug 28, 2014 at 13:56
  • 2
    The OP is successful in deleting the file since the report is that the app re-creates the file. This seems more about modifying the app's behavior or preventing it from writing the file than how to remove one instance of it.
    – bmike
    Commented Aug 28, 2014 at 14:12

2 Answers 2

6

I have gotten this error when trying to delete or affect an invisible file before. Temporarily turning the file visible usually, in my experience, changes the error to a dialog that asks if you are sure you would like to change the file. I figure you have probably already come across this command, but for completeness, here is the explanation:

To make invisible files visible, enter this code in terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder

and to make invisible files invisible again:

defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder

Note that this does close finder, so make sure you don't have any important folders open. I believe that it opens previously opened windows, but the back button doesn't work in my experience.

What's happening

defaults

This is OSX's command to change defaults, apple's low-level preference system.

write

This tells defaults you want to change a preference, or write it

com.apple.finder

This tells defaults that the application's preferences you want to change is Finder, specified by the application's bundle identifier.

AppleShowAllFiles

This specifies which preference you want to change within the application.

TRUE or FALSE

This is the value you want to set the preference to. In this case, it is a boolean, so the values must be TRUE or FALSE. I think you might be able to use YES or NO, but I'm not sure.

&&

This is a terminal operator to run whatever's after this if the previous command is successful

killall

I don't know much about this, but it kills processes or closes applications

Finder

Specifies which process or application to close.

7
  • 1
    I always have files visible, but I still get this error whenever I try to modify one that is invisible.
    – callum
    Commented Aug 21, 2015 at 15:37
  • 1
    That's odd. I just tried it, and on my computer it doesn't. Are you running into the issue in Finder, or another program? Commented Aug 23, 2015 at 2:13
  • 1
    It's certainly odd, but making files visible does not prevent the error, at least in the OP's case and in mine. I keep a file of shell aliases called .aliases. I just tried to copy it to my Dropbox folder to replace the one that's there (visibly) and I get the same error as the OP.
    – hepcat72
    Commented Apr 1, 2017 at 18:14
  • 2
    Is this answer still accurate? I'm trying to restore a bunch of files like .bash_history from backup and the first step is not fixing the error.
    – jcollum
    Commented Jul 20, 2017 at 3:51
  • 1
    I'm not convinced this answer is accurate any longer.
    – rpeg
    Commented Mar 23, 2018 at 5:18
0

When modifications are made to the running-process known as the Finder, it is necessary to terminate and restart the Finder for those changes to take effect.

If you were to select "Finder" in the "Force Quit Applications" pop-up from under the Apple menu you would see the button says "Relaunch" as opposed to "Force Quit."

"Killall" is a command line utility which allows one to send "kill signals" to a running process by name, instead of requiring the PID. (man killall)

"Killall Finder" is the equivalent restart action for the Finder at the Command line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .