def uninstall_package(package, version=None, local=False, npm='npm'):
    if version:
        package += '@%s' % version

    if local:
        run('%(npm)s uninstall -l %(package)s' % locals())
    else:
        run_as_root('HOME=/root %(npm)s uninstall -g %(package)s' % locals())
Uninstall a Node.js package.
dataset/ETHPy150Open ronnix/fabtools/fabtools/nodejs.py/uninstall_package