# How to completely uninstall / remove a plugin

**URL:** https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034
**Category:** Self-hosting
**Created:** [January 1, 2017, 8:25pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034 "2017-01-01T20:25:22Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![will\_io](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/will_io/32/147541_2.png) [@will\_io](https://meta.discourse.org/u/will_io)
#### Post date: [January 1, 2017, 8:25pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/1 "2017-01-01T20:25:22Z")

</div>

I only rebuild a few times per year. I am currently running into an issue with a plugin I do not want.

When I include the plugin repository in my `app.yml` file I can bootstrap but run into blank screens with the following errors:

![](https://global.discourse-cdn.com/meta/original/3X/9/c/9cd23c918ce88d42b5d64e03097193b92f00e507.png)

When I comment out the plugin repository in `app.yml` I fail to bootstrap.

So my question is, how can I fully remove [the plugin(s)](https://github.com/discourse-pro) and all of their remnants from my install as if it were never there in the first place?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 1, 2017, 9:01pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/2 "2017-01-01T21:01:15Z")

</div>

> [@will\_io](#):
>
> When I comment out the plugin repository in app.yml I fail to bootstrap.

Can you share the error in bootstrap when doing a rebuild without the plugin?

---

<div class="post-metadata">

### Author: ![will\_io](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/will_io/32/147541_2.png) [@will\_io](https://meta.discourse.org/u/will_io)
#### Post date: [January 1, 2017, 11:57pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/3 "2017-01-01T23:57:18Z")

</div>

Here is the error when I try to bootstrap without the plugin.

```
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return # <Process::Status: pid 22379 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install -- deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}`

```

And then scrolled up I get this:

```
I, [2017-01-01T23:52:03.038385 #15] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
URGENT: type Failed to initialize site default
rake aborted!
ArgumentError: type

```

Handy with most things but I don’t know where to start with this because I bootstrap fine with the plugin.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [January 2, 2017, 1:50am UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/4 "2017-01-02T01:50:38Z")

</div>

Looks like df-core is the plugin at fault. Isn’t that one of the Discouse PRO plugins? It’s been a while since I looked at the code on those but if memory serves they contained db migrations. Not sure if that’s good or bad at the moment.

Is it possible that by removing the plugin (and thus removing the migrations) it’s throwing an error?

---

<div class="post-metadata">

### Author: ![Cozdabuch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cozdabuch/32/139120_2.png) [@Cozdabuch](https://meta.discourse.org/u/Cozdabuch)
#### Post date: [October 4, 2017, 4:22am UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/5 "2017-10-04T04:22:24Z")

</div>

nobody knows how to just remove a plugin??

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [October 4, 2017, 3:53pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/6 "2017-10-04T15:53:26Z")

</div>

To remove a plugin, simply remove the `- git clone https://github.com/...` line from your `app.yml` file and rebuild your site via `./launcher rebuild app`.

---

<div class="post-metadata">

### Author: ![ariznaf](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@ariznaf](https://meta.discourse.org/u/ariznaf)
#### Post date: [September 19, 2019, 2:52pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/9 "2019-09-19T14:52:41Z")

</div>

Would that method remove the entries the plugin would have created in the database, like tables or records?

Or when you uninstall a plugin garbage in the database would be left after it?

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [November 12, 2019, 3:39pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/10 "2019-11-12T15:39:48Z")

</div>

> [@jomaxro](#):
>
> To remove a plugin, simply remove the `- git clone https://github.com/...` line from your `app.yml` file and rebuild your site via `./launcher rebuild app` .

I did this method multiple times, the Fingerprint plugin will not uninstall even though it is not in my app.yml.

How to delete this anyway?

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [November 12, 2019, 4:03pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/11 "2019-11-12T16:03:56Z")

</div>

Did you rebuild after you edited your app.yml?

Did you clear you local cache?

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [November 12, 2019, 4:04pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/12 "2019-11-12T16:04:47Z")

</div>

Yes, I’ve had several rebuilds and changes since. I cleared my cache.

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [November 12, 2019, 4:12pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/13 "2019-11-12T16:12:10Z")

</div>

And you saved after you changed your app.yml 🤷‍♂️

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [November 12, 2019, 4:12pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/14 "2019-11-12T16:12:49Z")

</div>

Ofcourse, otherwise plugins I installed after would not install, but they are 😀

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [November 12, 2019, 4:14pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/15 "2019-11-12T16:14:06Z")

</div>

In a support forum nothing is obvious 😱

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [June 11, 2021, 7:12am UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/16 "2021-06-11T07:12:19Z")

</div>

For those who only administer Discourse occasionally, or newbies, or in general to save time, it’s most helpful to be as specific as possible.

In this particular case, where exactly is the `app.yml` file? I don’t see one in `/var/discourse`, but I do see an `app-sparkpost.yml`. Maybe that’s the file I created ~5 years ago when I deployed the instance; I don’t know. Is that the right path? How does discourse knows to read this file if there’s no `app.yml` in `/var/discourse`?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [June 11, 2021, 10:29am UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/17 "2021-06-11T10:29:06Z")

</div>

I wouldn’t expect to find any yaml files at `/var/discourse` itself, no. The correct path would be `/var/discourse/containers`. I _believe_ Discourse will read all files in the containers directory, but an engineer will be better equipped to answer this than me. I don’t think the name actually matters.

---

<div class="post-metadata">

### Author: ![ddelrio1986](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ddelrio1986/32/206148_2.png) [@ddelrio1986](https://meta.discourse.org/u/ddelrio1986)
#### Post date: [June 16, 2021, 4:32pm UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/18 "2021-06-16T16:32:54Z")

</div>

I believe the `app.yml` can be found at `/var/discourse/containers/app.yml`. You will need to edit that file and remove any references to the plugin. You should be able to locate something similar to the following in the file:

```plaintext
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-jwt.git
          - git clone https://github.com/zh99998/discourse-cross-origin.git

```

Each of the git clone lines there refers to a plugin installed in the Discourse instance. After editing the file you will need to rebuild your Discourse application. From the `/var/discourse` folder you can run `./launcher rebuild app` to rebuild your Discourse application.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 4, 2022, 8:34am UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/19 "2022-10-04T08:34:56Z")

</div>

11 posts were split to a new topic: [Rebuild taking ~3hours](https://meta.discourse.org/t/rebuild-taking-3hours/240859)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 4, 2022, 8:35am UTC](https://meta.discourse.org/t/how-to-completely-uninstall-remove-a-plugin/55034/20 "2022-10-04T08:35:21Z")

</div>


