0

i was unsuccessful for installing jdk8 and i want to delete the java folder in my usr/local.

cd /usr/local
rm java
error :rm: cannot remove ‘java’: Is a directory
rmdir java
error :rmdir: failed to remove ‘java’: Permission denied

what is the accurate cmd line?

1 Answers1

2

sudo rm -r /usr/local/java will suffice. sudo gives you the appropriate permissions to delete the directory and the -r ("r" stands for recursive) option is needed to delete the contents of the directory recursively.

Please make sure you intend to delete the /usr/local/java directory before running the command above.

edwinksl
  • 23,789