Пример #1
0
def uninstall(programName):
  print("Uninstalling "+programName)
  if dockerImages.isProgramsImageInstalled(programName):
    while not docker.runDocker(["rmi","subuser-"+programName]) == 0:
      if not raw_input("Once you have solved the problem either type [y] to continue, or [q] to exit: ") == 'y':
        sys.exit()
  if os.path.exists(paths.getExecutablePath(programName)):
    os.remove(paths.getExecutablePath(programName))

  registry.unregisterProgram(programName)
  programHomeDir=paths.getProgramHomeDirOnHost(programName)
  if os.path.exists(programHomeDir):
    print("The program has been uninstalled but it's home directory remains:")
    print(programHomeDir)
  print(programName+" uninstalled successfully.")
Пример #2
0
def uninstall(programName):
    print("Uninstalling " + programName)
    if dockerImages.isProgramsImageInstalled(programName):
        while not docker.runDocker(["rmi", "subuser-" + programName]) == 0:
            if not raw_input(
                    "Once you have solved the problem either type [y] to continue, or [q] to exit: "
            ) == 'y':
                sys.exit()
    if os.path.exists(paths.getExecutablePath(programName)):
        os.remove(paths.getExecutablePath(programName))

    registry.unregisterProgram(programName)
    programHomeDir = paths.getProgramHomeDirOnHost(programName)
    if os.path.exists(programHomeDir):
        print(
            "The program has been uninstalled but it's home directory remains:"
        )
        print(programHomeDir)
    print(programName + " uninstalled successfully.")
Пример #3
0
def removeImage(imageID):
  docker.runDocker(["rm",imageID])
Пример #4
0
def removeImage(imageID):
    docker.runDocker(["rm", imageID])