Hi, while you're welcome to post here, this is not a general forum for Node. It's the community forum for NodeBB, a Node.js based forum software.
You'll probably have better luck with your question on StackOverflow or Reddit.
If for example, a plugin may insert data into database, then when uninstall this plugin, how could we hook this event so that we could do some data deletions.
@jiangcaiyang the problem is, even if there is a hook built in... using ACP is not the only way to uninstall a plugin. You can uninstall it using npm or delete the folder from npm_modules directly. The hook won't be called in those cases.
@pichalite My purpose is, if some one follows the official instruction by uninstall it via ACP page, he will get unused old plugins' data deleted automatically ffrom database. Thus reduced the redundant data. The other way however, does not take this action. so the advised way is to use ACP to uninstall it.
@jiangcaiyang you can use these hooks for plugin activation, deactivation and uninstall
action:plugin.activate action:plugin.deactivate action:plugin.uninstall