Command line question, removing one of two duplicate directories in the Applkications folder.

Eyoung
Contributor

I have what I thought was a non issue.. but for the life of me I cannot get a command to run right.
in the applications folder i have two similar items:
drwxr-xr-x 5 admin admin 170B Sep 23 2011 SimBio Virtual Labs drwxr-xr-x 5 admin staff 170B Aug 7 09:07 SimBio Virtual Labs.app

I need to delete the SimBio Virtual Labs folder.... not the app. If i try to path it out the OS just spits back no such file directory...

it seem to identify the folder and app separately: SimBio Virtual Labs / SimBio Virtual Labs.app/ but will not take the command to delete the folder

is there a way to specify the target as the folder?

thanks

1 ACCEPTED SOLUTION

Eyoung
Contributor

the real question is why it didn't occur to me to delete the <expletive delted> .app FIRST. thanks for the help all.

for those still reading along:

rm -r /Applications/SimBio Virtual Labs.app
rm -r /Applications/Mitosis and Meiosis Explored.app
rm -r /Applications/SimBio Virtual Labs /

View solution in original post

10 REPLIES 10

Eyoung
Contributor

egads how do you correct spelling in a title???

alexjdale
Valued Contributor III

Can you post the command you are using to delete it? I am not aware of any reason it should matter that there is an app with a similar name, since they are discrete elements.

ctangora
Contributor III
find /Applications -name "SimBio Virtual Labs" -maxdepth 1 -delete

Should do the trick.

luke_j_nelson
New Contributor II
rm -r /Path/To/SimBio Virtual Labs

should work, right?

ctangora
Contributor III

You may want to do it as ```
rm -frd .....
```

Eyoung
Contributor

rm -r was what I assumed would work.

tried: find /Applications -name "SimBio Virtual Labs" -maxdepth 1 -delete no dice
also tried the added switches to rm suggested.

there is nothing special that I can see about this directory. it was garbage left behind from an old package of the simbio apps.

thanks for the replies

Eyoung
Contributor

If I first delete the .app file then a regular rm -r will kill the directory.... but not the other way around. :-

Eyoung
Contributor

the real question is why it didn't occur to me to delete the <expletive delted> .app FIRST. thanks for the help all.

for those still reading along:

rm -r /Applications/SimBio Virtual Labs.app
rm -r /Applications/Mitosis and Meiosis Explored.app
rm -r /Applications/SimBio Virtual Labs /

luke_j_nelson
New Contributor II

That's odd... makes no sense to me. Doesn't really matter which order though, unless you come across a situation where you want to leave the .app in place.

Is there really a space after Labs?

Eyoung
Contributor

very odd. as near as I can tell the Finder see no space.. but it looks like there is a space if i look at it via the terminal.