title: launchctl - remove enabled/disabled override
body: <p>On OS X Yosemite (10.10), is there any way to remove the enabled/disabled override setting for a service?</p>
  
  <p>For example, to permanently disable non-existent service 'test' for root, do this:</p>
  
  <pre><code>sudo launchctl disable user/0/test
  </code></pre>
  
  <p>Check that it has been added to the disabled list:</p>
  
  <pre><code>sudo launchctl print-disabled user/0
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>disabled services = {
      "test" =&gt; true
  }
  login item associations = {
  }
  </code></pre>
  
  <p>Now, how can I delete "test" from the disabled services list?</p>
  
  <p>(I know I can enable it, but I just want to remove the entry entirely.) </p>
  
  <p><strong>Note:</strong></p>
  
  <p>If I reboot my computer, I see that the 'test' override has been added to a <code>launchd disabled</code> file:</p>
  
  <pre><code>sudo cat /var/db/com.apple.xpc.launchd/disabled.0.plist
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;test&lt;/key&gt;
      &lt;true/&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>I have tried running this command to manually delete it from the <code>.plist</code> file:</p>
  
  <pre><code>sudo /usr/libexec/Plistbuddy /var/db/com.apple.xpc.launchd/disabled.0.plist -c Delete:test
  </code></pre>
  
  <p>This does delete it from the file, but it just comes back again when I reboot my computer. Any ideas?</p>