Restore and Diagnose Packages
By the end of this chapter, you will know how to inspect a package startup failure and choose an explicit recovery or security response while preserving your confirmed records and personal configuration.
Restart normally with the same state root after enabling the canary. Verified
local content reconstructs the confirmed command generation offline, without a
redownload or repeated consent. A package you disabled stays disabled; use
package-enable and review its exact authority again to re-enable it.
The catalog cache can be expired or offline without deleting installed bytes.
Use package-doctor to inspect current and previous locks, actual visible
runtime generation, durable certainty, pending journal and the next recovery
action. Installation, runtime visibility and durable confirmation are separate
facts. A final disk failure can leave new commands visible in the current process
while durable confirmation is interrupted. Do not infer that the old runtime
remained active from the error alone.
Close the editor normally when possible. To inspect interrupted records without
executing package code, add --package-recovery inspect to the terminal launch
from Chapter 1. After reviewing the result, restart with one explicit choice:
| Flag | Result |
|---|---|
--package-recovery continue | Continue the recorded operation after verification. |
--package-recovery previous | Prepare the retained previous lock through recovery. |
--safe-mode | Execute no package or personal configuration code; preserve durable records. |
Keep the same state directory and configuration. Missing, corrupt or malformed content is not silently discarded or activated. Safe mode and inspection leave unrecognized data in place. Package recovery does not restore unsaved buffer text; Recover Unsaved Work covers that separate workflow.
Use package-advisory-list to inspect signed issuer/catalog evidence, affected
exact releases or digests, classification and lifecycle. Deprecation,
vulnerability, policy rejection and confirmed malice are distinct. A verified
confirmed-malicious match blocks new installation and automatic activation.
Inspection identifies affected locks and benign previous versions. Choose
package-disable or an inspected benign package-rollback and confirm that
native transition yourself. Merely listing an advisory does not revoke a live
generation or rewrite personal configuration.
For exact flags, bounds and failure outcomes, use the package runtime reference. Curators and package authors can prepare reviewable local outputs with the publication tooling reference; production repository provisioning, key custody and official HTTPS publication remain a separate delivery.
Previous: Update and Remove Packages | Part | User Guide | Next: Interface