Restore a deleted package
Undo a delete_package call, within GitHub’s ~30-day retention window.
-
Know the exact
org,packageType, andpackageNameof the deleted package. If you’re not certain a delete happened recently enough to be recoverable, try the call anyway — a request outside the window, or where something has since republished under the same name, surfaces as a plaingithub_api_errorrather than corrupting anything. -
Call the tool:
restore_package { org: "your-org", packageType: "npm", packageName: "your-package" } -
On success you get back
{ org, packageType, packageName }.
No confirm-echo guard
Section titled “No confirm-echo guard”Unlike the delete tools, restore_package takes no confirm* field.
Restoring undoes a delete rather than causing new loss, so it isn’t given
the same friction.
Verify it worked
Section titled “Verify it worked”Call get-org-package with the same org,
packageType, and packageName to confirm the package is visible again.