reggi/dev-engines
@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: Changing package visibility |
| 3 | --- |
| 4 | |
| 5 | You can change the visibility of a scoped package from the website or command line. |
| 6 | |
| 7 | You must be the owner of the user account or organization that owns the package in order to change package visibility. |
| 8 | |
| 9 | For more information about package visibility, see "[Package scope, access level, and visibility][pkg-viz]". |
| 10 | |
| 11 | <Note> |
| 12 | |
| 13 | **Note:** You cannot change the visibility of an unscoped package. Only scoped packages with a paid subscription may be private. |
| 14 | |
| 15 | </Note> |
| 16 | |
| 17 | ## Making a public package private |
| 18 | |
| 19 | <Note> |
| 20 | |
| 21 | **Note:** Making a package private requires a paid user account or organization. To sign up for a paid user or organization, go to `https://www.npmjs.com/settings/account-name/billing`, replacing `account-name` with the name of your npm user account or organization. |
| 22 | |
| 23 | </Note> |
| 24 | |
| 25 | If you want to restrict access and visibility for a public package you own, you can make the package private. When you make a package private, its access will be updated immediately and it will be removed from the website within a few minutes of the change. |
| 26 | |
| 27 | ### Using the website |
| 28 | |
| 29 | 1. On the [npm website][npmjs-com], go to the package page. |
| 30 | 2. On the package page, click **Settings**. |
| 31 | 3. Under "Package Access", select "Is Package Private?" |
| 32 | 4. Click **Update package settings**. |
| 33 | |
| 34 | ### Using the command line |
| 35 | |
| 36 | To make a public package private on the command line, run the following command, replacing `<package-name>` with the name of your package: |
| 37 | |
| 38 | ``` |
| 39 | npm access restricted <package-name> |
| 40 | ``` |
| 41 | |
| 42 | For more information, see the [`npm access`](https://docs.npmjs.com/cli-documentation/access) documentation. |
| 43 | |
| 44 | ## Making a private package public |
| 45 | |
| 46 | <Note> |
| 47 | |
| 48 | **Note:** When you make a private package public, the package will be visible to and downloadable by all npm users. |
| 49 | |
| 50 | </Note> |
| 51 | |
| 52 | ### Using the website |
| 53 | |
| 54 | 1. On the npm website, go to the package page. |
| 55 | 2. On the package page, click **Settings**. |
| 56 | 3. Under "Package Access", deselect "Is Package Private?" |
| 57 | 4. Click **Update package settings**. |
| 58 | |
| 59 | ### Using the command line |
| 60 | |
| 61 | To make a private package public on the command line, run the following command, replacing `<package-name>` with the name of your package: |
| 62 | |
| 63 | ``` |
| 64 | npm access public <package-name> |
| 65 | ``` |
| 66 | |
| 67 | For more information, see the [`npm access` CLI documentation][access-cli]. |
| 68 | |
| 69 | [contact-support]: https://www.npmjs.com/support |
| 70 | [pkg-viz]: package-scope-access-level-and-visibility |
| 71 | [npmjs-com]: https://npmjs.com |
| 72 | [access-cli]: /cli/access |