ARTIFACTORY: How to delete plugins that keep coming back after restart

Rasul Imanov
2023-01-22 11:07

You might encounter a situation in which you try to delete a plugin but it keeps reappearing in your Artifactory after a restart. 

From our previous experience, we have seen this behavior when there are some issues with the existing plugins and we are unable to remove them. 

In order to overcome this issue, you may follow the below steps:

Step 1: Navigate to the $JFROG_HOME/var/etc/artifactory/plugins directory and try renaming all the files available inside the plugin directory with .force.delete extension

Step 2: Log in to the database and proceed to delete the plugin’s related entries from the config_name using the below command by replacing the actual plugin name which you are using currently.  Please restart the Artifactory service after these changes. 
 delete from configs where config_name like '%artifactory/config/plugins%';User-added image

*** Before deleting, ensure, by running the SELECT command to confirm we are deleting the configs only related to plugins (example below). The SELECT statement will confirm that what you want to delete exists in the database in the first place

 select * from configs where config_name like '%artifactory/config/plugins%';User-added image

In case the files are still present in the plugins directory, please follow the below steps.

  1. Shutdown Artifactory
  2. Delete the unwanted plugin files – *.delete and *.groovy files, from the plugins folder
  3. Delete the corresponding records in the configs table related to plugins
  4. Start Artifactory