anchor.diff:    % untar
     erl_tar:extract({binary, TarData}, [{cwd, plugin_dir()}, keep_old_files]).
   
  +-spec delete_files(string(), string()) -> ok | {error, atom()}.
  +delete_files(Name, Version) ->
  +  PluginPath = plugin_dir() ++ "/" ++ get_file_slug(Name, Version),
  +  file:del_dir(PluginPath).
   
   % downloads a pluygin .tar.gz into a local plugins directory
   -spec download(string()) -> ok | {error, string()}.
  
positive.code: 
  % Idempotent uninstall, if you uninstall a non-existant
  % plugin, you get an `ok`.
  % -spec uninstall(string()) -> ok | {error, string()}.
  % uninstall(Name) ->
  %   % unload app
  %   ok = unload_plugin(Name),
  %   log("plugin unloaded"),
  
  %   % unload config
  %   ok = unload_config(Name),
  %   log("config unloaded"),
  
  %   % delete files
  %   ok = delete_files(Name),
  %   log("files deleted"),
  
  %   % remove code path
  %   ok = remove_code_path(Name),
  %   log("removed code path"),
  
  %   % unregister plugin
  %   ok = unregister_plugin(Name),
  %   log("unregistered plugin"),
  
  %   % done
  %   ok.
  
  %% * * *
  
  
negative.code: % the License.
  -module(couch_plugins).
  -include("couch_db.hrl").
  -export([install/1, uninstall/1]).
  
  % couch_plugins:install({"geocouch", "http://127.0.0.1:8000", "1.0.0", [{"R15B03", "+XOJP6GSzmuO2qKdnjO+mWckXVs="}]}).
  % couch_plugins:install({"geocouch", "http://people.apache.org/~jan/", "couchdb1.2.x_v0.3.0-11-gd83ba22", [{"R15B03", "ZetgdHj2bY2w37buulWVf3USOZs="}]}).
  