---
title: ":published()"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/selectors/pseudo-classes/published"
image: "https://docs.vlt.io/og/client/selectors/pseudo-classes/published"
lang: "en"
---

# :published()

The `:published()` pseudo-class matches packages based on their publication date. Useful for auditing when dependencies were last released.

## Syntax

```
:published(<date>)
:published("<comparator><date>")
```

The date parameter supports:

- Full dates: `2024-01-01`
- Year only: `2024`
- Year-month: `2024-06`

When using a comparator (`>`, `<`, `>=`, `<=`), the value must be quoted.

## Examples

### Exact date match

```bash title="Terminal"
$ vlt query ':published(2024-01-01)'
```

### After a date

```bash title="Terminal"
$ vlt query ':published(">2024")'
```

### Before a date

```bash title="Terminal"
$ vlt query ':published("<=2023-12-31")'
```

### What gets selected

Given:

```
my-app
├── react@18.2.0         ← published: 2022-06-14
├── typescript@5.3.0     ← published: 2023-11-20
└── vite@5.0.0           ← published: 2023-11-16
```

The query `:published(">2023")` selects:

```
my-app
├── react@18.2.0
├── typescript@5.3.0      ✅ published after 2023
└── vite@5.0.0            ✅ published after 2023
```

### Finding old packages

Find packages published more than 2 years ago:

```bash title="Terminal"
$ vlt query ':published("<2024")'
```

### Combining with other selectors

Find outdated packages that were published before 2023:

```bash title="Terminal"
$ vlt query ':outdated:published("<2023")'
```

## See also

- [`:outdated()`](https://docs.vlt.io/client/selectors/pseudo-classes/outdated.md) — find packages with newer versions
- [`:unmaintained`](https://docs.vlt.io/client/selectors/security-insights.md) — packages not updated in 5+ years
