reggi/overrides
@reggi/path-to-regexp
dependabot/npm_and_yarn/main/copy-to-clipboard-4.0.2
dependabot/npm_and_yarn/main/eslint-10.4.0
dependabot/npm_and_yarn/main/npmcli/eslint-config-7.0.0
dependabot/npm_and_yarn/main/proc-log-7.0.0
dependabot/npm_and_yarn/npm_and_yarn-826852524d
dependabot/npm_and_yarn/npm_and_yarn-ab9a7f4bc2
deprecate-totp-2fa
dhei/classic-tokens
gat-bypass-2fa-docs
jpg619/fix-accessibility-content-flow
jpg619/version-bump-tar-2
kartykp/gat-bypass-2fa-docs
kartykp/upgrade-path-to-regex
main
maitxn/version-bump-tar
patch-1
reggi/cache-based-on-version
reggi/dev-engines
reggi/fix-transform-prettier
reggi/overrides
update-search-sensitivity
| 1 | --- |
| 2 | title: Transferring a package from a user account to another user account |
| 3 | --- |
| 4 | |
| 5 | As a package owner or maintainer, you can transfer ownership of a package you no longer wish to maintain to another trusted npm user using either the npm website or the command line. |
| 6 | |
| 7 | For more information on how npm support handles package name disputes between users, you can refer to npm's [package name dispute policy][dispute-policy]. |
| 8 | |
| 9 | <Note> |
| 10 | |
| 11 | **Note:** You cannot transfer a scoped package to another user account or organization, because a package's scope _is_ the user account or organization name. You will need to create a new package in the new scope. |
| 12 | |
| 13 | </Note> |
| 14 | |
| 15 | ## Transferring a package from a user account to another user account on the website |
| 16 | |
| 17 | To transfer a package you own or maintain to another user, follow these steps: |
| 18 | |
| 19 | 1. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package: `https://www.npmjs.com/package/<your-package-name>`. |
| 20 | |
| 21 | 2. On the package Admin tab, under "Maintainers", enter the npm username of the new maintainer. |
| 22 | |
| 23 | <Screenshot src="/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-invite.png" alt="Screenshot showing text field to invite maintainers" /> |
| 24 | |
| 25 | 3. Click "Invite." |
| 26 | |
| 27 | 4. To remove yourself as a maintainer, under the maintainers list, click the "x" next to your username. |
| 28 | |
| 29 | <Screenshot src="/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-list.png" alt="Screenshot showing maintainer list" /> |
| 30 | |
| 31 | ## Transferring a package from a user account to another user account on the command line |
| 32 | |
| 33 | To transfer a package to another npm user using the CLI, run the [`npm owner add`][npm-owner] command replacing `<their-username>` with the other user's npm username. An email invitation is sent to the other user. After the user has accepted the invitation, run the `npm owner rm` command replacing `<your-username>` with your npm username: |
| 34 | |
| 35 | ``` |
| 36 | npm owner add <their-username> <package-name> |
| 37 | |
| 38 | # new maintainer accepts invitation |
| 39 | |
| 40 | npm owner rm <your-username> <package-name> |
| 41 | ``` |
| 42 | |
| 43 | If you have two-factor authentication enabled for writes, add a one-time password to the command, `--otp=123456` (where _123456_ is the code from your authenticator application). |
| 44 | |
| 45 | ``` |
| 46 | npm owner add <their-username> <package-name> --otp=123456 |
| 47 | |
| 48 | # new maintainer accepts invitation |
| 49 | |
| 50 | npm owner rm <your-username> <package-name> --otp=123456 |
| 51 | ``` |
| 52 | |
| 53 | [dispute-policy]: /policies/disputes |
| 54 | [npm-owner]: cli/owner |