S6-INSTANCE-DELETE(8)

NAME
s6-instance-delete - delete an existing instance of a currently supervised s6-instanced-service(7)

SYNOPSIS
s6-instance-delete [-X] [-t timeout] servicedir name

DESCRIPTION
s6-instance-delete expects a running, supervised s6-instanced-service(7) 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.

s6-instance-delete is similar to s6-svunlink(8), 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(8) are relatively expensive operations, because they have to recursively copy or delete directories and use the s6-ftrigr(7) synchronization mechanism with the instance supervisor, compared to s6-instance-control(8) 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(8) than it is to repeatedly create and delete it.

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.

EXIT STATUS

0   Success.

100 Wrong usage.

111 System call failed.

SEE ALSO
s6-instanced-service(7), s6-instance-control(8), s6-instance-create(8), s6-instance-list(8), s6-instance-maker(8), s6-instance-status(8)

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)