title: could not delete files from dfs as safe mode is on
body: <p>I am using cloudera's VM to run hadoop. 99% of dfs space is used up. So I need to delete the files, but to delete the files the safe mode needs to be turned off.</p>
  
  <p>I tried to turn off safe mode with the following commands,</p>
  
  <pre><code>sudo -u hdfs hdfs dfsadmin -safemode leave
  </code></pre>
  
  <p>It said its been turned off, but due to low space it automatically turns it on. And when I tried to delete file, it says since safe mode is on ,you cannot delete the files.</p>
  
  <pre><code>SafeModeException: Cannot create directory /user/cloudera/.Trash/Current. Name node is in safe mode. Resources are low on NN. Please add or free up more resources then turn off safe mode manually. NOTE: If you turn off safe mode before adding resources, the NN will immediately return to safe mode.. (error 403)
  </code></pre>
  
  <p>To delete files, safe mode needs to be turned off. To turn off safe mode, I need to free up space! So how do I clean up files to give more space?</p>