To keep your account and packages secure, we strongly recommend revoking (deleting) tokens you no longer need or that have been compromised. You can revoke any token you have created.

  1. To see a list of your tokens, on the command line, run:

    npm token list
  2. In the tokens table, find and copy the ID of the token you want to delete.

  3. On the command line, run the following command, replacing 123456 with the ID of the token you want to delete:

    npm token delete 123456

    npm will report Removed 1 token

  4. To confirm that the token has been removed, run:

    npm token list

Note: You must use the token ID to delete a token, not the truncated version of the token. In some cases, there may be a delay of up to an hour before a token is successfully revoked.

Edit this page on GitHub
1 contributormona
Last edited by mona on March 21, 2023
声明:npm 及相关 logo 的版权归 npmjs.com 所有。本站点仅用于 npm 中文文档,与 npmjs.com 没有任何关系。由于译者水平有限,且避免产生误解,条款和政策内容不进行翻译,关于这部分,请移步官网查看最新内容。