title: Can't rm -R directory MacOS Catalina
body: <p>I deleted a system directory because Carbon Copy Cloner was unable to back it up and suggested replacing it. After deleting and restarting it was rebuilt by the system. However I could not delete the directory from the trash using standard methods or Terminal commands - even logged in as root. Even after disabling System Integrity Protection I had no luck.</p>
  
  <p>Finder says:
  The operation can’t be completed because the item “powerlog” is in use.</p>
  
  <p>File was located here:</p>
  
  <pre><code>private&gt;var&gt;db&gt;powerlog&gt;
  </code></pre>
  
  <p>The directory that was recreated by the system contains subfolders and files but the directory in the trash has none:</p>
  
  <pre><code>sh-3.2# ls -la /Users/admin/Desktop/powerlog
  total 0
  drwxrwxrwx  3 root   wheel   96 Oct 29 16:37 .
  drwx------+ 9 admin  staff  288 Nov 14 13:18 ..
  </code></pre>
  
  <p>Attempting rm -R give this result:</p>
  
  <pre><code>sh-3.2# rm -R /Users/admin/.Trash/powerlog
  rm: /Users/admin/.Trash/powerlog: Directory not empty
  </code></pre>
  
  <p>I could not delete it after logging in as root either.</p>
  
  <p>It appears no application is using the folder:</p>
  
  <pre><code>sh-3.2# lsof /Users/admin/.Trash/powerlog
  sh-3.2# 
  </code></pre>