# Install xmlstarlet with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop

XML command-line utilities. Version 1.6.1 via Homebrew; verified 2026-07-10. Also installable with debian: sudo apt install xmlstarlet.

## Install

```sh
sudo av install brew:xmlstarlet
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install xmlstarlet
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xmlstarlet
```

  Evidence: MacPorts ports tree: textproc/xmlstarlet/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xmlstarlet
```

  Evidence: Alpine Linux edge package indexes: xmlstarlet from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install xmlstarlet
```

  Evidence: Debian stable package indexes: xmlstarlet from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install xmlstarlet
```

  Evidence: Fedora Rawhide package metadata: xmlstarlet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xmlstarlet
```

  Evidence: nixpkgs package indexes: pkgs/by-name/xm/xmlstarlet/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S xmlstarlet
```

  Evidence: Arch Linux sync databases: xmlstarlet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install xmlstarlet
```

  Evidence: openSUSE Tumbleweed package metadata: xmlstarlet from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install xmlstarlet
```

  Evidence: Chocolatey community package catalog: xmlstarlet from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','wsl-ubuntu-2204'

- Scoop (92%):

```sh
scoop install main/xmlstarlet
```

  Evidence: Scoop official bucket manifest trees: bucket/xmlstarlet.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:xmlstarlet
- **Package manager:** Homebrew
- **Version:** 1.6.1
- **Source summary:** XML command-line utilities
- **Homepage:** <https://xmlstar.sourceforge.net/>
- **Last updated:** 2026-07-10T09:59:34-04:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- xml (alias)
- xmlstarlet (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.6.1
## Project history and usage

XMLStarlet is the classic Unix-shell XML toolkit: query, transform, validate, edit, format, canonicalize, and inspect XML from a single command-line interface. It was explicitly framed as doing for XML what grep, sed, awk, diff, patch, and related tools do for plain text.

### Project history

The SourceForge news archive records the first XMLStarlet release in May 2003, describing a C program using GNOME's libxml2 and libxslt to query, check, transform, search, and edit XML documents. The 0.1.0 announcement a few days later stated the project's goal as creating a command-line XML toolkit for shell prompts and automated processing.

Early releases moved quickly through 2003 and 2004, including validation fixes, Relax NG support, Windows availability, HP-UX binaries, and a FreeBSD port. Version 1.0.0 was announced in January 2005, and later distribution files show the 1.6.1 source release in 2014.

The project homepage later noted that development had stalled and asked for help with maintenance, bug fixes, and Windows packaging. That maintenance note is part of the package's history: XMLStarlet became stable infrastructure, with far more downstream script value than upstream churn.

### Adoption history

XMLStarlet spread because it matched the way Unix users already handled text: one executable, composable subcommands, stdin/stdout behavior, and concise XPath/XSLT operations. Early SourceForge news called out a FreeBSD port in 2004 and Windows builds, showing that adoption was not limited to one Unix family.

### How it is used

Common uses include XPath extraction with xml sel, in-place-like XML editing with xml ed, XSLT transformation with xml tr, validation against DTD, XSD, or Relax NG with xml val, pretty-printing with xml fo, canonicalization with xml c14n, escaping text, listing element structure, and turning directory listings into XML.

The user guide emphasizes that the select command generates and applies XSLT from command-line templates, which lets shell scripts perform structured XML queries without writing a separate stylesheet.

### Why package nerds care

XMLStarlet is one of the few XML tools that feels native in a pipeline. For package nerds, it is the dependable answer to 'jq, but for XML before jq existed': small enough to install everywhere, powerful enough for metadata rewrites, and old enough to appear in build scripts, distro tooling, and release automation.

### Timeline

- 2003-05-07: SourceForge announced the first XMLStarlet release and project site updates.
- 2003-05-11: XMLStarlet 0.1.0 was released with the command-line XML toolkit goal.
- 2004-07-01: The project announced that the FreeBSD port was ready.
- 2005-01-29: XMLStarlet 1.0.0 was released.
- 2014-08-09: SourceForge files list xmlstarlet-1.6.1 as the latest source release.

### Related projects

- Related projects and technologies include libxml2, libxslt, xsltproc, xmllint, XPath, XSLT, EXSLT, Relax NG, XML canonicalization, DocBook, and shell text tools such as grep, sed, awk, diff, and patch.

### Sources

- <https://sourceforge.net/p/xmlstar/news/>
- <https://sourceforge.net/projects/xmlstar/files/>
- <https://xmlstar.sourceforge.net/>
- <https://xmlstar.sourceforge.net/doc/UG/ch01.html>
- <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html>


## Security Notes

No matching local secret-handling manifest was found for xmlstarlet. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Other Package-Manager Records

- Debian apt - xmlstarlet - 1.6.1-4: normalized package name match | Debian stable package indexes: xmlstarlet from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command line XML toolkit | http://xmlstar.sourceforge.net/
- Nix - xmlstarlet: normalized package name match | nixpkgs package indexes: pkgs/by-name/xm/xmlstarlet/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - xmlstarlet - 1.6.1-4: normalized package name match | Ubuntu 24.04 LTS package indexes: xmlstarlet from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command line XML toolkit | http://xmlstar.sourceforge.net/
- apk - xmlstarlet - 1.6.1-r2: normalized package name match | Alpine Linux edge package indexes: xmlstarlet from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A set of tools to transform, query, validate, and edit XML documents | https://xmlstar.sourceforge.net/
- apk - xmlstarlet-doc - 1.6.1-r2: normalized package name match | Alpine Linux edge package indexes: xmlstarlet-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A set of tools to transform, query, validate, and edit XML documents (documentation) | https://xmlstar.sourceforge.net/
- dnf - xmlstarlet - 1.6.1-31.fc45: normalized package name match | Fedora Rawhide package metadata: xmlstarlet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Command Line XML Toolkit | http://xmlstar.sourceforge.net/
- pacman - xmlstarlet - 1.6.1-6: normalized package name match | Arch Linux sync databases: xmlstarlet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A set of tools to transform, query, validate, and edit XML documents | http://xmlstar.sourceforge.net/
- zypper - xmlstarlet - 1.6.1-4.3: normalized package name match | openSUSE Tumbleweed package metadata: xmlstarlet from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Command Line Tool to Process XML Documents | https://sourceforge.net/projects/xmlstar/
- MacPorts - xmlstarlet: normalized package name match | MacPorts ports tree: textproc/xmlstarlet/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - xmlstarlet: normalized package name match | Chocolatey community package catalog: xmlstarlet from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','wsl-ubuntu-2204'
- Scoop - main/xmlstarlet: normalized package name match | Scoop official bucket manifest trees: bucket/xmlstarlet.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/xmlstarlet.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xmlstarlet.yml)


## Sources

- pkg.so package database
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
