Answers.Body: <p>Assuming that you entered your explosive JavaScript directly into the control panel (as opposed to an external file), the answer is... complicated.*</p>
  
  <hr>
  
  <blockquote>
    <p><em>* Disclaimer: I am not a Project Config expert. This advice has not been thoroughly tested. Please tread carefully when editing your database and/or <code>project.yaml</code> file.</em></p>
  </blockquote>
  
  <hr>
  
  <p>If you're using <a href="https://docs.craftcms.com/v3/project-config.html" rel="nofollow noreferrer">Project Config</a>, you'll want to update the value stored in your <code>config/project.yaml</code> file. Once you've done that, run <code>./craft project-config/sync</code> to update your database accordingly.</p>
  
  <p>If you're <em>not</em> using Project Config, then you should be able to just update the database directly. Go to the <code>projectconfig</code> table and change this row...</p>
  
  <pre><code>|  plugins.cp-js.settings.additionalJs  |  (your explosive js)  |
  </code></pre>
  
  <p>For reference, here's a flowchart to illustrate how the data gets saved...</p>
  
  <p><a href="https://i.sstatic.net/rqdLU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rqdLU.png" alt="Plugin Settings Flowchart"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-16T01:39:35.590Z
Answers.Text: Yes, I had enter my JS directly into the control panel. 
  Brilliant! Your answer solves it. Thanks.
Answers.UserDisplayName: 4midori
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-15T20:36:02.913Z
Answers.LastActivityDate: 2020-05-15T20:36:02.913Z
Answers.UserDisplayName: Lindsey D
Body: <p>I was using the <a href="https://github.com/doublesecretagency/craft-cpjs" rel="nofollow noreferrer">Control Panel JS plugin</a>, and I entered some erroneous JavaScript that caused it to break the control panel. I then deleted its row in the plug-ins table in the database, and all associated files.</p>
  
  <p>However, when I reinstall it, it finds the old JavaScript and things break again. I cannot figure out where this information is stored.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-15T18:48:06.353Z
Comments.Text: If you deleted the external JS file, then it shouldn’t be able to trigger anything, correct? Or did you enter the JS directly into the control panel?
Comments.UserDisplayName: Lindsey D
Tags: <plugins><control-panel>
Title: Plugin removed, can't get rid of its data | Control Panel JS
ThreadText: # Plugin removed, can't get rid of its data | Control Panel JS
  
  (Asked by: username_0 on 2020-05-15)
  
  I was using the [Control Panel JS plugin](https://github.com/doublesecretagency/craft-cpjs), and I entered some erroneous JavaScript that caused it to break the control panel. I then deleted its row in the plug-ins table in the database, and all associated files.
  
  However, when I reinstall it, it finds the old JavaScript and things break again. I cannot figure out where this information is stored.
  
  **Tags:** plugins, control-panel
  
  > **Comments:**
  > **username_1**: If you deleted the external JS file, then it shouldn’t be able to trigger anything, correct? Or did you enter the JS directly into the control panel?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-05-15. Score: 3 | Accepted answer
  
  Assuming that you entered your explosive JavaScript directly into the control panel (as opposed to an external file), the answer is... complicated.\*
  
  ---
  
  > *\* Disclaimer: I am not a Project Config expert. This advice has not been thoroughly tested. Please tread carefully when editing your database and/or `project.yaml` file.*
  
  ---
  
  If you're using [Project Config](https://docs.craftcms.com/v3/project-config.html), you'll want to update the value stored in your `config/project.yaml` file. Once you've done that, run `./craft project-config/sync` to update your database accordingly.
  
  If you're *not* using Project Config, then you should be able to just update the database directly. Go to the `projectconfig` table and change this row...
  
  ```
  |  plugins.cp-js.settings.additionalJs  |  (your explosive js)  |
  
  ```
  
  For reference, here's a flowchart to illustrate how the data gets saved...
  
  [![Plugin Settings Flowchart](https://i.sstatic.net/rqdLU.png)](https://i.sstatic.net/rqdLU.png)
  
  > **Comments:**
  > **username_0**: Yes, I had enter my JS directly into the control panel.  Brilliant! Your answer solves it. Thanks.  
  
  ---
  
  