Zum Hauptinhalt springen
Markdown anzeigen

Unlink Instance

The unlink command removes a local connection to a ZeyOS instance.

Bash
zeysdk unlink [INSTANCE_ID] [options]

Parameters

ParameterDescriptionRequiredExample
INSTANCE_IDInstance to unlinkNomyinstance

Options

OptionDescription
--break-lockReplace the current sync lock after you verify its operation is no longer running
--verboseShow detailed output

Process

  1. Validation

    • Loads linked instances
    • Uses the active instance automatically when INSTANCE_ID is omitted
    • Verifies that the selected instance exists
  2. Unlinking

    • Removes the explicit non-active instance file, or removes .zeysdk/sync.json when unlinking the active instance
    • Prompts for a replacement before unlinking the active instance when multiple other links exist
    • Leaves no active instance when no linked instances remain
    • Restores affected sync files if the local unlink operation fails

Examples

Bash
zeysdk unlink myinstance
zeysdk unlink

Error Handling

ErrorDescriptionResolution
Missing sync.jsonNo active instance configurationRun zeysdk link
Invalid instanceInstance is not linkedChoose a linked instance
Delete failedSync files could not be removedCheck local permissions

Notes

  • unlink removes local connection state for the selected instance
  • Remote applications and files are not deleted
  • Globally saved host credentials are not deleted; use zeysdk host remove for that
  • If the active instance is unlinked, another linked instance can become active
  • When no linked instances remain, no active instance is set

Best Practices

  • Use zeysdk whoami before unlinking the active instance
  • Unlink old development instances that are no longer used
  • Keep production instance names easy to recognize
  • unlink refuses to mutate instance state while another synchronization or instance-state operation owns the project lock