Will uninstalling a plugin leave any residual debris files in the database?

AI-generated summary

This discussion is about how to completely remove a plugin from a self-hosted Discourse installation, including any residual data left behind in the database.

Truest provided steps to uninstall a plugin by editing the app.yml file and rebuilding the app. However, they asked if this would leave any residual debris files in the database, and if so, how to remove them.

pfaffman mentioned that it depends on the plugin, as some add custom fields or tables to the database. Truest then specifically asked about removing residue from official Discourse plugins.

pfaffman explained that while some plugins add data to the database, it’s generally safe to leave it as trying to remove it can cause more issues. However, they acknowledged that for plugins like User Notes, the data would need to be manually removed by inspecting the plugin’s source code.

pfaffman provided more details on the User Notes plugin, noting it uses the plugin store and custom user fields. They estimated it could take 30-120 minutes to remove the data, but also mentioned that most people don’t worry about this issue as the residual data doesn’t take up much space or cause harm.

Edit the app.yml File:
Navigate to my Discourse installation directory, typically /var/discourse.
Open the containers/app.yml file.
Remove the lines that reference the plugin you want to uninstall. These lines usually look like git clone https://github.com/username/plugin-name.git.
Save the changes to the app.yml file.
Rebuild the Application:
Run ./launcher rebuild app from the /var/discourse directory.

I want to delete the Discourse plugin installed on self-hosting in this way, will this leave any residual debris files in the database?

If it does, what do I need to do to completely remove it, even the residual debris files?

It depends on the plugin

When limited to Discourse official plugins, how do i generally remove residue?

It depends on the plugin. Some add stuff, some don’t.

Some add custom fields. Some add tables. Mostly they don’t hurt anything and you’re more likely to break something by trying to remove them than they are likely to cause problems.

  1. Discourse User Notes
  2. Discourse Templates
  3. Events Plugin 📅
  4. Multilingual Plugin 🌐
  5. Discourse Private Replies

I would like to know how to delete a plugin like this.

User notes appears to use the plugin store and user custom fields. You’d need to look at the source to see the keys used for each to remove them. If you’re not comfortable doing that you can ask in Marketplace. I’d guess it would take me between 30 and 120 minutes.

They don’t take up much room and can’t hurt anything. Most people don’t worry about this issue.