﻿---
title: stack kb fleet-package-policies get-fleet-package-policies cli command
description: Get package policies Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4116/reference/elastic-cli/cli/stack/kb/fleet-package-policies/get-fleet-package-policies
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb fleet-package-policies get-fleet-package-policies cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb fleet-package-policies get-fleet-package-policies [options]
```

Get package policies
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--page number">
    Page number
  </definition>
  <definition term="--per-page number">
    Number of results per page
  </definition>
  <definition term="--sort-field string">
    Field to sort results by
  </definition>
  <definition term="--sort-order enum">
    Sort order, ascending or descending
    **Values:** desc, asc
  </definition>
  <definition term="--show-upgradeable">
    When true, only show policies with available upgrades
  </definition>
  <definition term="--kuery string">
    A KQL query string to filter results
  </definition>
  <definition term="--format enum">
    Format for the response: simplified or legacy
    **Values:** simplified, legacy
  </definition>
  <definition term="--with-agent-count">
    When true, include the agent count per package policy
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>