How to fix a manually deleted plugin directory

May 28, 2007

plugins.pngTo uninstall a plugin you normally use the “symfony plugin-uninstall” command but not everyone knows that, and just deleting the directory from the plugins directory is a often mistake.

After deleting the directory PEAR still thinks that the plugin is installed (try executing “symfony plugin-list“).

Installing the plugin again to uninstall it properly won’t work either. It will skip the package and say that it is aleady installed.

>> pear      Skipping package "symfony/sfThumbnailPlugin", already
>> pear      installed as version 1.3.0
>> pear      No valid packages found

But there is an easy fix for this problem:

Each plugin stores a .reg file in the PEAR registry, this registry is hidden in the plugins directory – you just need to delete the file from the registry.
For example, if you have accidentally deleted the sfThumbnailPlugin directory, just remove the registry file too:

rm plugins/.registry/

PEAR will not think that the plugin is installed anymore (check with “symfony plugin-list“).


3 Responses to “How to fix a manually deleted plugin directory”

  1. brainfault Says:

    Thanks for the tip, a lot of time saved I was looking into pear registry dir itself and I didn’t think to check symfony plugins dir

  2. I definitely took some unique insight from this. It’s great that you spent the time to do all of this. I repeatedly find myself personally wasting a bit too much time both reading and/or commenting. But so what, it was nevertheless worthwhile.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: