Skip to content

Commit 8d034bc

Browse files
mergify[bot]natasha-moore-elasticgithub-actions[bot]
authored
[8.16] Document ways to provide multiple Agent uninstall tokens (backport #6300) (#6352)
* Document ways to provide multiple Agent uninstall tokens (#6300) * Document ways to provide multiple Agent uninstall tokens * Apply suggestions from code review Co-authored-by: Benjamin Ironside Goldstein <[email protected]> --------- Co-authored-by: Benjamin Ironside Goldstein <[email protected]> (cherry picked from commit 87e3acb) # Conflicts: # docs/serverless/edr-install-config/agent-tamper-protection.asciidoc # docs/serverless/edr-install-config/uninstall-agent.asciidoc * Delete docs/serverless directory and its contents --------- Co-authored-by: natasha-moore-elastic <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 162228f commit 8d034bc

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

docs/getting-started/agent-tamper-protection.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ If you need the uninstall token to remove {agent} from an endpoint, you can find
4848

4949
** Click the *Show token* icon in the *Token* column to reveal a specific token.
5050
** Click the *View uninstall command* icon in the *Actions* column to open the *Uninstall agent* flyout, containing the full uninstall command with the token.
51+
52+
TIP: If you have many tamper-protected {agent} policies, you may want to <<multiple-uninstall-tokens>> in a single command.

docs/getting-started/uninstall-agent.asciidoc

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,43 @@ To uninstall {agent} from a host, run the `uninstall` command from the directory
55

66
If <<agent-tamper-protection,Agent tamper protection>> is enabled on the Agent policy for the host, you'll need to include the uninstall token in the command, using the `--uninstall-token` flag. You can <<fleet-uninstall-tokens,find the uninstall token>> on the Agent policy. Alternatively, find *{fleet}* in the navigation menu or by using the {kibana-ref}/introduction.html#kibana-navigation-search[global search field], and select *Uninstall tokens*.
77

8-
98
For example, to uninstall {agent} on a macOS or Linux host:
109

1110
[source,shell]
1211
----------------------------------
1312
sudo elastic-agent uninstall --uninstall-token 12345678901234567890123456789012
1413
----------------------------------
1514

15+
[discrete]
16+
[[multiple-uninstall-tokens]]
17+
== Provide multiple uninstall tokens
18+
19+
If you have multiple tamper-protected {agent} policies, you may want to provide multiple uninstall tokens in a single command. There are two ways to do this:
20+
21+
* The `--uninstall-token` command can receive multiple uninstall tokens separated by a comma, without spaces.
22+
+
23+
[source,shell]
24+
----------------------------------
25+
sudo elastic-agent uninstall -f --uninstall-token 7b3d364db8e0deb1cda696ae85e42644,a7336b71e243e7c92d9504b04a774266
26+
----------------------------------
27+
28+
* `--uninstall-token`'s argument can also be a path to a text file with one uninstall token per line.
29+
+
30+
NOTE: You must use the full file path, otherwise the file may not be found.
31+
+
32+
[source,shell]
33+
----------------------------------
34+
sudo elastic-agent uninstall -f --uninstall-token /tmp/tokens.txt
35+
----------------------------------
36+
+
37+
In this example, `tokens.txt` would contain:
38+
+
39+
[source,txt]
40+
----------------------------------
41+
7b3d364db8e0deb1cda696ae85e42644
42+
a7336b71e243e7c92d9504b04a774266
43+
----------------------------------
44+
1645
[discrete]
1746
[[uninstall-endpoint]]
1847
== Uninstall {elastic-endpoint}

0 commit comments

Comments
 (0)