The s6-instance-delete program
s6-instance-delete deletes an existing instance of a currently supervised instanced service.
Interface
s6-instance-delete [ -X ] [ -t timeout ] servicedir name
- s6-instance-delete expects a running, supervised instanced service in servicedir, as well as an existing instance of this service named name (it doesn't matter if the instance is up or down).
- It deletes the name instance.
- It exits 0.
Exit codes
- 0: success
- 100: wrong usage
- 111: system call failed
Options
- -X : don't wait. s6-instance-delete will exit right away, without waiting for the instance (and its supervisor) to properly disappear.
- -t timeout : if the instance supervisor has not exited after timeout milliseconds, s6-instance-delete will still exit. By default, timeout is 0, which means no time limit.
Notes
- s6-instance-delete is similar to s6-svunlink, because it uses the same underlying library functions. Under the hood, an instance is a regular service running on a supervision tree that is specific to the instanced service, and s6-instance-delete removes a service directory from that tree.
- If the template for the service is logged, then s6-instance-delete will delete both the instance and its logger.
- s6-instance-delete and s6-instance-create are relatively expensive operations, because they have to recursively copy or delete directories and use the synchronization mechanism with the instance supervisor, compared to s6-instance-control which only has to send commands to already existing supervisors. If you are going to turn instances on and off on a regular basis, it is more efficient to keep the instance existing and control it with s6-instance-control than it is to repeatedly create and delete it.
