Automic VaultAutomic Vault

brew

Install xsel with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Command-line program for getting and setting the contents of the X selection. Version 1.2.1 via Homebrew; verified 2026-05-25.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install xsel

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install xsel

MacPorts ports tree · x11/xsel/Portfile · source: api.github.com

Linux

Alpine Linux apkverified · 92%
sudo apk add xsel

Alpine Linux edge package indexes · xsel · source: dl-cdn.alpinelinux.org

Debian aptverified · 92%
sudo apt install xsel

Debian stable package indexes · xsel · source: deb.debian.org

Fedora dnfverified · 92%
sudo dnf install xsel

Fedora Rawhide package metadata · xsel · source: dl.fedoraproject.org

Nixverified · 92%
nix profile install nixpkgs#xsel

nixpkgs package indexes · pkgs/by-name/xs/xsel/package.nix · source: api.github.com

Arch Linux pacmanverified · 92%
sudo pacman -S xsel

Arch Linux sync databases · xsel · source: geo.mirror.pkgbuild.com

openSUSE zypperverified · 92%
sudo zypper install xsel

openSUSE Tumbleweed package metadata · xsel · source: download.opensuse.org

overview

Package summary

Command-line program for getting and setting the contents of the X selection

Commands and aliases

  • xsel

history

Project history and usage

xsel is Conrad Parker's command-line utility for reading and setting X selections. It turns PRIMARY, SECONDARY, and CLIPBOARD selection ownership into a pipe-friendly Unix interface, making X11 copy/paste state usable from shell scripts and terminal workflows.

Project history

The xsel manpage identifies Conrad Parker as author and dates the program to July 2001, while the license file carries a 2001 copyright. Its homepage presents the core problem plainly: the X selection is normally accessible by manually highlighting text and pasting with the middle mouse button, while xsel lets files, pipes, and scripts participate.

The project developed around X11's ICCCM selection model. The manpage notes that there is no X selection buffer: xsel must own the selection and serve it on demand, often by forking a background process in input, keep, and exchange modes.

Adoption history

xsel became a standard small X11 utility because it solved a daily terminal-desktop gap. The homepage says it is available in most distributions, and package metadata shows it in Homebrew, Alpine, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE ecosystems.

Its closest cultural sibling is `xclip`; both became staples in scripts that move text between command output, terminal multiplexers, editors, browsers, and the X clipboard. xsel's options for append, follow, keep, exchange, and secondary selection make it especially explicit about the underlying X selection machinery.

How it is used

Common usage is `command | xsel -b` to put text on the CLIPBOARD selection, `xsel -b -o` to print clipboard contents, `xsel < file` to own the PRIMARY selection with file contents, and `xsel > file` to save the current selection exactly.

The manpage documents PRIMARY as the default, with `--secondary` and `--clipboard` selecting the other X selections. Because X selection contents are served by the owner, xsel may detach in modes where it must keep supplying data after the shell command exits.

Why package nerds care

xsel is tiny, but it teaches a core X11 lesson: clipboard-like behavior is inter-client communication, not simply a global text buffer. Packaging it gives shell users a reliable bridge into that model.

It is also one of those utilities whose value increases in combinations: SSH sessions with X forwarding, terminal multiplexers, editors, scripts, password managers, build logs, and bug-report commands all benefit from being able to pipe text into or out of the X selection.

Timeline

  • 2001-07: The xsel manpage dates Conrad Parker's authorship to July 2001.
  • 2001: The license file records Conrad Parker copyright for xsel.
  • 2008-01: The distributed manpage is dated January 2008.
  • 2009: The homepage lists version 1.2.0 as the latest available tarball.
  • 2020s: xsel remains packaged across Linux, BSD, macOS package-manager, and X11 compatibility environments.

Related projects

  • xclip is the closest alternative command-line X clipboard/selection utility.
  • xclipboard is the classic X clipboard manager referenced by the xsel manpage.
  • ICCCM defines the X selection conventions xsel follows.
  • Wayland-native clipboard tools such as wl-clipboard fill the equivalent niche outside X11.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 12 platform targets.
  • Installs with 1 runtime dependencies.
  • Build metadata lists 5 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
xselcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version1.2.1
manager updated2026-05-25
local dataok
upstreamcurrent
latest detected1.2.1

https://github.com/kfish/xsel

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:xsel
Version1.2.1
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/xsel
Homepagehttps://www.vergenet.net/~conrad/software/xsel/
Repositoryhttps://github.com/kfish/xsel
Upstream docshttps://www.vergenet.net/~conrad/software/xsel
LicenseHPND-sell-variant
Source archivehttps://github.com/kfish/xsel/archive/refs/tags/1.2.1.tar.gz
Last updated2026-05-25T14:39:17-04:00
Pulseupdated
Dependencieslibx11
Build dependenciesautoconf, automake, libtool, libxt, pkgconf
Bottleavailable (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namexsel
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

xsel 1.2.1-1

command-line tool to access X clipboard and selection buffers

http://www.vergenet.net/~conrad/software/xsel/

sudo apt install xsel
  • Section: x11
  • Architecture: amd64
  • 2 dependencies
  • normalized package name match
  • Matched by: Xsel
Debian stable package indexes · deb.debian.org · Debian stable package indexes: xsel from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

xsel

nix profile install nixpkgs#xsel
  • normalized package name match
  • Matched by: Xsel
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/xs/xsel/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

xsel 1.2.1-1

command-line tool to access X clipboard and selection buffers

http://www.vergenet.net/~conrad/software/xsel/

sudo apt install xsel
  • Section: universe/x11
  • Architecture: amd64
  • 2 dependencies
  • normalized package name match
  • Matched by: Xsel
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: xsel from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

xsel 1.2.1-r0

Command-line program for manipulating the X selection

http://www.vergenet.net/~conrad/software/xsel

sudo apk add xsel
  • License: MIT
  • Architecture: x86_64
  • Source Package: xsel
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Xsel
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: xsel from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
apk95%

xsel-doc 1.2.1-r0

Command-line program for manipulating the X selection (documentation)

http://www.vergenet.net/~conrad/software/xsel

sudo apk add xsel-doc
  • License: MIT
  • Architecture: x86_64
  • Source Package: xsel
  • normalized package name match
  • Matched by: Xsel
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: xsel-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
dnf95%

xsel 1.2.1-10.fc44

Command line clipboard and X selection tool

https://www.vergenet.net/~conrad/software/xsel/

sudo dnf install xsel
  • License: HPND-sell-variant
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: xsel
  • 3 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Xsel
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: xsel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
pacman95%

xsel 1.2.1-2

Command-line program for getting and setting the contents of the X selection

https://vergenet.net/~conrad/software/xsel/

sudo pacman -S xsel
  • License: custom
  • Architecture: x86_64
  • 1 dependencies
  • normalized package name match
  • Matched by: Xsel
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: xsel from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

xsel 1.2.1-1.6

Command-line Program for Getting and Setting the Contents of the X Selection

http://www.kfish.org/software/xsel/

sudo zypper install xsel
  • License: MIT
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: xsel
  • 2 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Xsel
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: xsel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
MacPorts95%

xsel

sudo port install xsel
  • normalized package name match
  • Matched by: Xsel
MacPorts ports tree · api.github.com · MacPorts ports tree: x11/xsel/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment