def remove_package(package, image=None, restart=False):
 cmd = ['DISM', '/Quiet', ('/Image:{0}'.format(image) if image else '/Online'), '/Remove-Package']
 if (not restart):
  cmd.append('/NoRestart')
 if ('~' in package):
  cmd.append('/PackageName:{0}'.format(package))
 else:
  cmd.append('/PackagePath:{0}'.format(package))
 return __salt__['cmd.run_all'](cmd)

def remove_package ( package , image = None , restart = False ) : cmd = [ 'DISM' , '/Quiet' , ( '/Image:{0}' . format ( image ) if image else '/Online' ) , '/Remove-Package' ] if ( not restart ) : cmd . append ( '/NoRestart' ) if ( '~' in package ) : cmd . append ( '/PackageName:{0}' . format ( package ) ) else : cmd . append ( '/PackagePath:{0}' . format ( package ) ) return __salt__ [ 'cmd.run_all' ] ( cmd )
uninstall a package args: package : the full path to the package .