Files
nomad/website/content/docs/commands/system/gc.mdx
Aimee Ukasick dae496e427 Docs: SEO front matter description for search: commands section (#25175)
* Enhance front matter description for search

* acl section

* alloc section

* config section

* deployment section

* eval section

* job section

* license section

* namespace section

* node section

* node pool section

* operator section

* plugin section

* quota section

* recommendation section

* scaling section

* sentinel section

* server section

* service section

* setup section

* system section

* tls section

* var section

* volume section

* change reference to command reference

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-03-19 12:02:02 -05:00

47 lines
1.5 KiB
Plaintext

---
layout: docs
page_title: 'nomad system gc command reference'
description: |
The `nomad system gc` command runs the system garbage collection process on jobs, evaluations, allocations, and nodes.
---
# `nomad system gc` command reference
Initializes a garbage collection of jobs, evaluations, allocations, and nodes.
This is an asynchronous operation.
Nomad periodically garbage collects jobs, evaluations, allocations, and nodes.
The exact garbage collection logic varies by object, but in general Nomad only
permanently deletes objects once they are terminal and no longer needed for
future scheduling decisions. See [`gc` related server agent configuration
parameters][gc_params] for details on tuning periodic garbage collection.
[gc_params]: /nomad/docs/configuration/server#node_gc_threshold
The `system gc` command bypasses these settings and immediately attempts to
garbage collect dead objects regardless of any "threshold" or "interval" server
settings. This is useful to quickly free memory on servers running low, but
users should prefer tuning periodic garbage collection parameters to meet their
needs instead of relying on manually running `system gc`.
## Usage
```plaintext
nomad system gc [options]
```
If ACLs are enabled, this option requires a management token.
## General options
@include 'general_options_no_namespace.mdx'
## Examples
Running the system gc command does not output unless an error occurs:
```shell-session
$ nomad system gc
```