summaryrefslogtreecommitdiff
path: root/docs/swarm/swarm-tutorial/delete-service.md
blob: ee1e1c805a7f9152e92ed264fbf0585655327b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!--[metadata]>
+++
title = "Delete the service"
description = "Remove the service from the swarm"
keywords = ["tutorial, cluster management, swarm, service"]
advisory = "rc"
[menu.main]
identifier="swarm-tutorial-delete-service"
parent="swarm-tutorial"
weight=19
+++
<![end-metadata]-->

# Delete the service running on the swarm

The remaining steps in the tutorial don't use the `helloworld` service, so now
you can delete the service from the swarm.

1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.

2. Run `docker service remove helloworld` to remove the `helloworld` service.

    ```
    $ docker service rm helloworld

    helloworld
    ```

3. Run `docker service inspect <SERVICE-ID>` to veriy that the swarm manager
removed the service. The CLI returns a message that the service is not found:

    ```
    $ docker service inspect helloworld
    []
    Error: no such service or task: helloworld
    ```

## What's next?

In the next step of the tutorial, you set up a new service and and apply a
[rolling update](rolling-update.md).

<p style="margin-bottom:300px">&nbsp;</p>