def do_remove(app_name):
 LOG.info(('=== Uninstalling %s' % (app_name,)))
 reg = registry.AppRegistry()
 try:
  app = reg.unregister(app_name)
 except KeyError:
  LOG.error(('%s is not installed' % (app_name,)))
  return False
 app.uninstall_conf()
 reg.save()
 try:
  pthfile = pth.PthFile()
  pthfile.remove(app)
  pthfile.save()
  return True
 except (OSError, SystemError) as ex:
  LOG.error(("Failed to update the .pth file. Please fix any problem and run `%s --sync'\n%s" % (PROG_NAME, ex)))
  return False

def do_remove ( app_name ) : LOG . info ( ( '=== Uninstalling %s' % ( app_name , ) ) ) reg = registry . AppRegistry ( ) try : app = reg . unregister ( app_name ) except KeyError : LOG . error ( ( '%s is not installed' % ( app_name , ) ) ) return False app . uninstall_conf ( ) reg . save ( ) try : pthfile = pth . PthFile ( ) pthfile . remove ( app ) pthfile . save ( ) return True except ( OSError , SystemError ) as ex : LOG . error ( ( "Failed to update the .pth file. Please fix any problem and run `%s --sync'\n%s" % ( PROG_NAME , ex ) ) ) return False
uninstall the given app .