@plugins.command('remove')
@click.argument('plugin_identifier')
@click.option('--force', '-f', default=False, is_flag=True, help='Removes the plugin without asking for confirmation.')
def remove_plugin(plugin_identifier, force):
 validate_plugin(plugin_identifier)
 if ((not force) and (not click.confirm(click.style('Are you sure?', fg='magenta')))):
  sys.exit(0)
 plugin = get_plugin_from_all(plugin_identifier)
 click.secho('[+] Uninstalling plugin {}...'.format(plugin.name), fg='cyan')
 try:
  plugin_manager.uninstall_plugins([plugin])
 except Exception as e:
  click.secho("[-] Couldn't uninstall plugin because of following exception: \n{}".format(e), fg='red')
  if (not click.confirm(click.style('Do you want to continue anyway?', fg='magenta'))):
   sys.exit(0)
 click.secho('[+] Removing plugin from filesystem...', fg='cyan')
 shutil.rmtree(plugin.path, ignore_errors=False, onerror=None)

@ plugins . command ( 'remove' ) @ click . argument ( 'plugin_identifier' ) @ click . option ( '--force' , '-f' , default = False , is_flag = True , help = 'Removes the plugin without asking for confirmation.' ) def remove_plugin ( plugin_identifier , force ) : validate_plugin ( plugin_identifier ) if ( ( not force ) and ( not click . confirm ( click . style ( 'Are you sure?' , fg = 'magenta' ) ) ) ) : sys . exit ( 0 ) plugin = get_plugin_from_all ( plugin_identifier ) click . secho ( '[+] Uninstalling plugin {}...' . format ( plugin . name ) , fg = 'cyan' ) try : plugin_manager . uninstall_plugins ( [ plugin ] ) except Exception as e : click . secho ( "[-] Couldn't uninstall plugin because of following exception: \n{}" . format ( e ) , fg = 'red' ) if ( not click . confirm ( click . style ( 'Do you want to continue anyway?' , fg = 'magenta' ) ) ) : sys . exit ( 0 ) click . secho ( '[+] Removing plugin from filesystem...' , fg = 'cyan' ) shutil . rmtree ( plugin . path , ignore_errors = False , onerror = None )
removes a plugin from the filesystem .