2023-09-12 11:37:31 -07:00
---
layout: docs
page_title: host-sets remove-hosts - Command
2024-12-17 14:13:18 -05:00
description: >-
The "host-sets remove-hosts" command removes hosts from host set resources.
2023-09-12 11:37:31 -07:00
---
2025-11-04 10:22:10 -05:00
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
2023-09-12 11:37:31 -07:00
# host-sets remove-hosts
Command: `host-sets remove-hosts`
The `host-sets remove-hosts` command lets you remove hosts from host sets, if the types match and it is allowed by the host set type.
## Example
This example removes the host `hst_0987654321` from the host set `hsst_1234567890`:
```shell-session
$ boundary host-sets remove-hosts -id hsst_1234567890 -host hst_0987654321
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary host-sets remove-hosts <subcommand> [options] [args]
```
</CodeBlockConfig>
### Command options
- `-host=<string>` - The hosts you want to remove from the host set.
You can specify multiple hosts.
- `-id=<string>` - The ID of the containing host set you want to remove hosts from.
- `-version=<int>` - The version of the host set you want to remove hosts from.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'