Remove a plugin properly.