Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to remove this directory pear from my tmp folder, but it's not letting me.

I tried sudo rm -r pear

But then it asks me to override, and I put y and it says Permission denied. Any ideas how to fix this?

override rw-r--r--  root/wheel for pear/cache/0758c6bb0294a8697ed0d0f483ffbb80rest.cachefile? y
rm: pear/cache/0758c6bb0294a8697ed0d0f483ffbb80rest.cachefile: Permission denied
override rw-r--r--  root/wheel for pear/cache/0758c6bb0294a8697ed0d0f483ffbb80rest.cacheid? y
rm: pear/cache/0758c6bb0294a8697ed0d0f483ffbb80rest.cacheid: Permission denied
override rw-r--r--  root/wheel for pear/cache/09f3c0d5c6071dd733b69a3cf51e1496rest.cachefile? 
share|improve this question

migrated from stackoverflow.com May 28 '11 at 15:05

This question came from our site for professional and enthusiast programmers.

1  
have you tried adding the flag f? –  davogotland May 28 '11 at 10:36
    
@davogotland, no I haven't. Does it go at the end? –  Michael May 28 '11 at 11:01
    
@davogotland I'm not familiar with how to add that flag –  Michael May 28 '11 at 11:01
    
oh! sorry :) you're currently using one flag: r. the flags are preceded by a dash. so adding the f flag would look like this: rm -rf. your full command would be sudo rm -rf pear. the f flag removes any questions you would normally be asked. this makes using the f flag kind of risky. be careful when you use it! :) –  davogotland May 28 '11 at 13:51
    
The first step is to look at the permissions and see what's going on. Try ls -leOa pear/cache to view the full permissions and file flags on the files and the directory they're in. –  Gordon Davisson May 28 '11 at 16:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.