Deleting a .app in Terminal

Hi,
I am having problems deleting an applicaton (.app) in Terminal. I might point out that I am restricted to Simple Finder and I want to delete this file because I never use it anymore-I never seem to have this problem deleting directories or other file types. Someone please help me?!

Posted on Oct 29, 2005 8:05 AM

Reply
6 replies

Oct 29, 2005 8:20 AM in response to tony_115

If your account is not an administrator account then the problem could be that you simply don't have permission to remove the application.

And, it might help if you posted what you tried to do and what the error was.

However, assuming you do have permission to delete the app, the problem may be that most applications in OS X are actually folders containing the executable and supporting files. In order to "rm" a folder from Terminal you'll have to use the -R option to recursively delete the folder and all it's enclosed files.

rm -R /path/to/SomeApp.app


Be very careful using the -R option with rm. If you get the path wrong you could end up deleting way more than you expected... and there's not an "undo" option with rm.

Steve

Oct 29, 2005 8:52 AM in response to Steve Herman1

Ok thanks for your speedy reply. This is what happened:
I typed in rm -R ~/Documents/G2gui.app
And this scary message came up. I'm new to the terminal so do I just go "y" or what? Can you explain exactely what r-xr-xr-x is. Is it like the equivalent of permissions set at 777? Sorry if you don't understand me I just dunno how to phrase this stuff.

override r-xr-xr-x anthony/anthony for /Users/anthony/Documents/G2gui.app/Contents/MacOS/JavaApplicationStub?

Oct 29, 2005 9:57 AM in response to tony_115

A lot of the times when you get the "override" message it's because the file is locked. And even if you say "y" the file may still not be deleted.

That would explain why you're now getting a "Directory not empty" message (unless you tried to use "rmdir" which I believe will only work with empty directories).

You can use a recursive call to chflags to unlock any locked files in the directory like this:

chflags -R nouchg ~/Documents/G2gui.app

Then try the rm command again.

Steve

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Deleting a .app in Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.