delete: update deletion docs for consistency
Edward Thomson committed
Aug 11, 2021 at 13:57 UTC
8d9f551e06f6cdb5cf39dd9878f896e937d00a13
3 files changed
+56
-77
content/organizations/creating-and-managing-organizations/deleting-an-organization.mdx
+15
-5
@@ -5,7 +5,12 @@ redirect_from:
5
---
6
import shared from '../../../src/shared.js'
7
8
-You can delete your organization through the npmjs website.
8
+An organization administrator can delete the organization; packages in
9
+the organization will also [be deleted](/unpublishing-packages-from-the-registry) if they fulfill the
10
+[requirements to unpublish packages](/policies/unpublish). Packages that
11
+cannot be deleted will be
12
+[deprecated](/deprecating-and-undeprecating-packages-or-package-versions)
13
+instead.
14
15
1. <>{shared['user-login'].text}</>
16
@@ -15,15 +20,20 @@ You can delete your organization through the npmjs website.
20
21
<>{shared['account-settings'].image}</>
22
18
-3. In the left sidebar, click the name of the organization you want to delete.
23
+3. In the left sidebar, click the name of the organization that you want to delete.
24
<Screenshot src="/organizations/creating-and-managing-organizations/left-sidebar.png" alt="Screenshot of left sidebar" />
25
21
-4. On the organization page, go to the billing tab.
26
+4. <>{shared['organization-billing-tab'].text}</>
27
23
-5. On this page, you will find a button to delete your organization. Click that.
28
+ <>{shared['organization-billing-tab'].image}</>
29
+
30
+5. Under "delete organization", click <strong>Delete</strong>.
31
<Screenshot src="/organizations/creating-and-managing-organizations/org-delete-button.png" alt="Screenshot of org delete button" />
32
26
-6. You will now be presented with an overview of how many npm packages will be deleted and deprecated as part of your organization deletion. If you agree with this, then enter your organization name and click "Delete this organization".
33
+6. You will be given an overview of the packages in your organization and what will happen to them when your organization is deleted. Packages that [can be unpublished](/unpublishing-packages-from-the-registry) will be deleted; packages that cannot be deleted will be [deprecated](/deprecating-and-undeprecating-packages-or-package-versions).
34
+
35
+ If you are sure that you want to continue, enter your organization name and click <strong>Delete this organization</strong>.
36
+
37
<Screenshot src="/organizations/creating-and-managing-organizations/org-delete-plan.png" alt="Screenshot of org delete plan" />
38
39
## Deleting an organization in npm Enterprise
content/packages-and-modules/updating-and-managing-your-published-packages/deprecating-and-undeprecating-packages-or-package-versions.mdx
-39
@@ -2,8 +2,6 @@
2
title: Deprecating and undeprecating packages or package versions
3
---
4
5
-import shared from "../../../src/shared.js";
6
-
5
If you no longer wish to maintain a package, or if you would like to encourage users to update to a new or different version, you can [deprecate][deprecate-cli] it. Deprecating a package or version will print a message to the terminal when a user installs it.
6
7
A deprecation warning or message can say anything. You may wish to include a message encouraging users to update to a specific version, or an alternate, supported package.
@@ -46,43 +44,6 @@ The CLI will also accept version ranges for `<version>`.
44
45
If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
46
49
-### Deprecating a package from the website
50
-
51
-A package can be only deprecated (and not deleted) if it doesn't meet the requirements from the [package unpublishing policy](/unpublishing-packages-from-the-registry#how-to-unpublish).
52
-
53
-1. <>{shared["user-login"].text}</>
54
-
55
- <>{shared["user-login"].image}</>
56
-
57
-2. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package:
58
- `https://www.npmjs.com/package/<your-package-name>`.
59
-
60
-3. Click **Settings**.
61
- <Screenshot
62
- src="/packages-and-modules/securing-your-code/2fa-package-admin.png"
63
- alt="Screenshot showing the admin tab on a package page"
64
- />
65
-
66
-4. Click the **Deprecate package** button.
67
-
68
- <Screenshot
69
- src="/packages-and-modules/deleting-deprecating/deprecate-package-settings.png"
70
- alt="Screenshot showing the admin tab on a package page"
71
- />
72
-
73
-<Note>
74
-
75
-**Note:** If you have instead "Delete package" button, you cannot deprecate the package for now from the website. But you can still [delete the package](/unpublishing-packages-from-the-registry#unpublish-a-package-from-the-website).
76
-
77
-</Note>
78
-
79
-5. To complete the package deprecation, type your package name in the confirmation modal.
80
-
81
- <Screenshot
82
- src="/packages-and-modules/deleting-deprecating/deprecate-package-confirm.png"
83
- alt="Screenshot showing the admin tab on a package page"
84
- />
85
-
47
## Undeprecating a package or version
48
49
To undeprecate a package, replace `"<message>"` with `""` (an empty string) in one of the above commands.
content/packages-and-modules/updating-and-managing-your-published-packages/unpublishing-packages-from-the-registry.mdx
+41
-33
@@ -3,9 +3,9 @@ title: Unpublishing packages from the registry
3
---
4
import shared from '../../../src/shared.js'
5
6
-## How to unpublish
6
+As a package owner or collaborator, if your package has no dependents, you can permanently remove it from the npm registry by using the CLI. You can [unpublish](https://docs.npmjs.com/cli/v7/commands/npm-unpublish) within 72 hours of the initial publish; beyond 72 hours, you can still unpublish your package if [it meets certain criteria](https://www.npmjs.com/policies/unpublish).
7
8
-As a package owner or collaborator, if your package has no dependents, you can permanently remove it from the npm registry by using the CLI. You can [unpublish][unpublish-cli] within 72 hours of the initial publish. Beyond 72 hours, you can still unpublish your package if [it meets certain criteria][unpublish].
8
+These criteria are set to avoid damaging the JavaScript package ecosystem. If you cannot unpublish your package, you can [deprecate it instead](/deprecating-and-undeprecating-packages-or-package-versions).
9
10
<Note>
11
@@ -13,41 +13,19 @@ As a package owner or collaborator, if your package has no dependents, you can p
13
14
</Note>
15
16
-### Unpublishing a single version of a package
16
+## Unpublishing a package
17
18
-To unpublish a single version of a package, run the following command, replacing `<package-name>` with the name of your package, and `<version>` with your version number:
18
+If you want to completely remove all versions of a package from the registry, you can unpublish it completely. This will delete it from the registry and it will be unable to be installed.
19
20
-```
21
-npm unpublish <package-name>@<version>
22
-```
20
+To unpublish a package, you must meet the requirements of the [package unpublishing rules](#how-to-unpublish).
21
24
-### Unpublishing an entire package
25
-
26
-To unpublish an entire package, run the following command, replacing `<package-name>` with the name of your package:
27
-
28
-```
29
-npm unpublish <package-name> -f
30
-```
31
-
32
-If you have [two-factor authentication][two-factor-auth] enabled for writes, you will need to add a one-time password to the `unpublish` command, `--otp=123456` (where *123456* is the code from your authenticator app).
33
-
34
-<>If you need help unpublishing your package, please {shared['contact-support'].text}. If you are an Enterprise customer, please {shared['contact-enterprise-support'].text}</>.
35
-
36
-<Note>
37
-
38
-**Note:** If you unpublish an entire package, you may not publish any new versions of that package until 24 hours have passed.
39
-
40
-</Note>
41
-
42
-### Unpublish a package from the website
43
-
44
-Package can be deleted from the website if meets requirements from [package unpublishing rules](#how-to-unpublish).
22
+### Using the website
23
24
1. <>{shared["user-login"].text}</>
25
26
<>{shared["user-login"].image}</>
27
50
-2. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package:
28
+2. Navigate to the package page for the package you want to unpublish, replacing `<your-package-name>` with the name of your package:
29
`https://www.npmjs.com/package/<your-package-name>`.
30
31
3. Click **Settings**.
@@ -56,18 +34,18 @@ Package can be deleted from the website if meets requirements from [package unpu
34
alt="Screenshot showing the admin tab on a package page"
35
/>
36
59
-4. On this page find a button to Delete package. Click it.
37
+4. Under "delete package", click <strong>Delete package</strong>.
38
39
<Screenshot
40
src="/packages-and-modules/deleting-deprecating/delete-package-settings.png"
41
alt="Screenshot showing the admin tab on a package page"
42
/>
43
66
-<Note>
44
+ <Note>
45
68
-**Note:** If you have instead "Deprecate package" button, you cannot delete the package. Refer to the [rules](#how-to-unpublish). But you can still [deprecate the package](/deprecating-and-undeprecating-packages-or-package-versions#deprecating-a-package-from-the-website).
46
+ **Note:** If you cannot delete the package because it does not meet the [unpublishing requirements](#how-to-unpublish), then you will be prompted to [deprecate the package](/deprecating-and-undeprecating-packages-or-package-versions#deprecating-a-package-from-the-website).
47
70
-</Note>
48
+ </Note>
49
50
5. Confirmation modal appear. In order to continue type **package name**.
51
@@ -76,6 +54,36 @@ Package can be deleted from the website if meets requirements from [package unpu
54
alt="Screenshot showing the admin tab on a package page"
55
/>
56
57
+### Using the command line
58
+
59
+To unpublish an entire package, run the following command, replacing `<package-name>` with the name of your package:
60
+
61
+```
62
+npm unpublish <package-name> -f
63
+```
64
+
65
+If you have [two-factor authentication][two-factor-auth] enabled for writes, you will need to add a one-time password to the `unpublish` command, `--otp=123456` (where *123456* is the code from your authenticator app).
66
+
67
+<>If you need help unpublishing your package, please {shared['contact-support'].text}. If you are an Enterprise customer, please {shared['contact-enterprise-support'].text}</>.
68
+
69
+<Note>
70
+
71
+**Note:** If you unpublish an entire package, you may not publish any new versions of that package until 24 hours have passed.
72
+
73
+</Note>
74
+
75
+## Unpublishing a single version of a package
76
+
77
+If you want to remove a single version of a package, you can unpublish one version without affecting the others. This will delete only that version from the registry and it will be unable to be installed.
78
+
79
+### Using the command line
80
+
81
+To unpublish a single version of a package, run the following command, replacing `<package-name>` with the name of your package, and `<version>` with your version number:
82
+
83
+```
84
+npm unpublish <package-name>@<version>
85
+```
86
+
87
## When to unpublish
88
89
Unpublishing a package permanently removes the package from the registry so it is no longer available for other users to install. Once a package is unpublished, republishing under the same name is blocked for 24 hours. If you've unpublished a package by mistake, we'd recommend publishing again under a different name, or for unpublished versions, bumping the version number and publishing again.