import config import lib.powershell as powershell import os deploy_path = config.deploy_path if os.path.isdir(deploy_path): powershell.run_command_no_dir('pm2 delete all; rm "' + deploy_path + '" -r -force;') print('Package successfully removed') else: print('Package not installed')