docker service rm

Estimated reading time: 1 minute

Description

Remove one or more services

API 1.24+  The client and daemon API must both be at least 1.24 to use this command. Use the docker version command on the client to check your client and daemon API versions.

Usage

docker service rm SERVICE [SERVICE...]

Parent command

CommandDescription
docker serviceManage services
CommandDescription
docker service createCreate a new service
docker service inspectDisplay detailed information on one or more services
docker service logsFetch the logs of a service or task
docker service lsList services
docker service psList the tasks of one or more services
docker service rmRemove one or more services
docker service rollbackRevert changes to a service’s configuration
docker service scaleScale one or multiple replicated services
docker service updateUpdate a service

Extended description

Removes the specified services from the swarm. This command has to be run targeting a manager node.

Examples

Remove the redis service:

$ docker service rm redis

redis

$ docker service ls

ID  NAME  MODE  REPLICAS  IMAGE

Warning: Unlike docker rm, this command does not ask for confirmation before removing a running service.