# Install expect with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, winget

Program that can automate interactive applications. Version 5.45.4 via Homebrew; verified 2026-06-19.

## Install

```sh
sudo av install brew:expect
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install expect
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install expect
```

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

### Linux

- apk (92%):

```sh
sudo apk add expect
```

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

- Debian apt (92%):

```sh
sudo apt install expect
```

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

- dnf (92%):

```sh
sudo dnf install expect
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#expect
```

  Evidence: nixpkgs package indexes: expect from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S expect
```

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

- zypper (92%):

```sh
sudo zypper install expect
```

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

### Windows

- winget (92%):

```sh
winget install --id FlorinZamfir.Weather -e
```

  Evidence: Windows Package Manager source index: FlorinZamfir.Weather from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:expect
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/expect>
- **Version:** 5.45.4
- **Source summary:** Program that can automate interactive applications
- **Homepage:** <https://core.tcl-lang.org/expect/index>
- **Repository:** <https://core.tcl-lang.org/expect>
- **Upstream docs:** <https://core.tcl-lang.org/expect/dir>
- **License:** LicenseRef-Homebrew-public-domain
- **Source archive:** <https://downloads.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz>
- **Last updated:** 2026-06-19T12:30:06-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- autoexpect (cli)
- autopasswd (cli)
- cryptdir (cli)
- decryptdir (cli)
- dislocate (cli)
- expect (cli)
- ftp-rfc (cli)
- kibitz (cli)
- lpunlock (cli)
- mkpasswd (cli)
- multixterm (cli)
- passmass (cli)
- rftp (cli)
- rlogin-cwd (cli)
- timed-read (cli)
- timed-run (cli)
- tknewsbiff (cli)
- tkpasswd (cli)
- unbuffer (cli)
- weather (cli)
- xkibitz (cli)
- xpstat (cli)
- autoexpect (alias)
- autopasswd (alias)
- cryptdir (alias)
- decryptdir (alias)
- dislocate (alias)
- expect (alias)
- ftp-rfc (alias)
- kibitz (alias)
- lpunlock (alias)
- mkpasswd (alias)
- multixterm (alias)
- passmass (alias)
- rftp (alias)
- rlogin-cwd (alias)
- timed-read (alias)
- timed-run (alias)
- tknewsbiff (alias)
- tkpasswd (alias)
- unbuffer (alias)
- weather (alias)
- xkibitz (alias)
- xpstat (alias)

## Dependencies

- tcl-tk@8

## Build dependencies

- autoconf
- automake
- libtool

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 5.45.4
- Package-manager updated: 2026-06-19
- Local data: ok
- Upstream repository: https://core.tcl-lang.org/expect/index
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Expect is Don Libes' Tcl-based tool for automating interactive programs. Its package-manager significance comes from a stubbornly practical Unix problem: many tools were designed for humans at terminals, and Expect made those conversations scriptable.

### Project history

The Expect homepage says Expect was conceived in September 1987, with the bulk of version 2 designed and written between January and April 1990. It was later rewritten substantially for Tcl 6.0 in October 1991, then advanced through Expect 4 and Expect 5 as Tcl and Tk evolved.

Expect's history is tightly tied to Tcl and Tk. Expect uses Tcl as its control language for procedures, loops, file I/O, arithmetic, and scripting, and Tk support arrived with the Expect 4 line. The project also includes libexpect for C or C++ programs, although the README argues that the standalone expect scripting tool is usually the easier path.

### Adoption history

Expect spread through sysadmin and testing culture before today's automation stacks existed. The official site lists papers from USENIX 1990, LISA IV, Computing Systems, USENIX 1992, and other venues covering system administration, regression testing, conformance testing, and automating interactive network applications.

The README presents practical adoption signals from the era: users could get readings and transparencies, build Expect with or without Tcl and Tk, embed it in C programs, and buy commercial support or classes from companies such as ActiveState, Cygnus Support, and Computerized Processes Unlimited.

### How it is used

Expect scripts spawn a program, send input, wait for expected output, and optionally hand control back to the user. The official introduction names telnet, ftp, passwd, fsck, rlogin, and tip as examples, and also calls out testing interactive applications.

The package includes helper programs such as autoexpect and unbuffer. In package-manager terms, Expect is often installed not because it is fashionable, but because some installer, test, login workflow, serial-console workflow, or legacy admin script needs to drive an interactive prompt reliably.

### Why package nerds care

Expect is one of the canonical examples of a small Unix automation language that survived because the problem survived. SSH, CI, APIs, and configuration management reduced many uses, but they did not eliminate password prompts, REPLs, terminal programs, embedded consoles, or old scripts.

For packagers, Expect also brings the Tcl dependency relationship into focus: the executable is useful by itself, but its language runtime, optional Tk integration, examples, man pages, and legacy scripts shape how downstream packages split and test it.

### Timeline

- 1987: Expect was conceived in September.
- 1990: The bulk of version 2 was designed and written between January and April.
- 1991: About half of Expect was rewritten for Tcl 6.0.
- 1993: Expect 4 alpha introduced Tk support; production Expect 4 followed in August.
- 1994: Production Expect 5 was released in March.
- 1995: The Exploring Expect book became available in January.
- 1999: Substantial rewriting added Tcl 8.2 support, an exp-channel driver, object support, and Unicode-related work.

### Related projects

- Tcl is Expect's control language and runtime foundation.
- Tk is the GUI toolkit used by Expect variants such as expectk.
- DejaGnu is related through the regression and conformance testing use case mentioned in Expect's readings.

### Sources

- <https://core.tcl-lang.org/expect>
- <https://core.tcl-lang.org/expect/dir>


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** expect
- **Version Scheme:** 0
- **Revision:** 3
- **Conflicts With:** bash-snippets, ircd-hybrid
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - expect - 5.45.4-4: normalized package name match | Debian stable package indexes: expect from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automates interactive applications | https://core.tcl.tk/expect/
- Debian apt - tcl-expect - 5.45.4-4: normalized package name match | Debian stable package indexes: tcl-expect from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automates interactive applications (Tcl package) | https://core.tcl.tk/expect/
- Debian apt - tcl-expect-dev - 5.45.4-4: normalized package name match | Debian stable package indexes: tcl-expect-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Automates interactive applications (development) | https://core.tcl.tk/expect/
- Nix - expect: normalized package name match | nixpkgs package indexes: expect from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - expect - 5.45.4-3: normalized package name match | Ubuntu 24.04 LTS package indexes: expect from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automates interactive applications | https://core.tcl.tk/expect/
- Ubuntu apt - tcl-expect - 5.45.4-3: normalized package name match | Ubuntu 24.04 LTS package indexes: tcl-expect from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automates interactive applications (Tcl package) | https://core.tcl.tk/expect/
- Ubuntu apt - tcl-expect-dev - 5.45.4-3: normalized package name match | Ubuntu 24.04 LTS package indexes: tcl-expect-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Automates interactive applications (development) | https://core.tcl.tk/expect/
- apk - expect - 5.45.4-r5: normalized package name match | Alpine Linux edge package indexes: expect from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool for automating interactive applications | https://core.tcl-lang.org/expect/index
- apk - expect-dev - 5.45.4-r5: normalized package name match | Alpine Linux edge package indexes: expect-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool for automating interactive applications (development files) | https://core.tcl-lang.org/expect/index
- apk - expect-doc - 5.45.4-r5: normalized package name match | Alpine Linux edge package indexes: expect-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool for automating interactive applications (documentation) | https://core.tcl-lang.org/expect/index
- dnf - expect - 5.45.4-31.fc45: normalized package name match | Fedora Rawhide package metadata: expect from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A program-script interaction and testing utility | https://core.tcl.tk/expect/index
- dnf - expect-devel - 5.45.4-31.fc45: normalized package name match | Fedora Rawhide package metadata: expect-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A program-script interaction and testing utility | https://core.tcl.tk/expect/index
- dnf - expectk - 5.45.4-31.fc45: normalized package name match | Fedora Rawhide package metadata: expectk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A program-script interaction and testing utility | https://core.tcl.tk/expect/index
- pacman - expect - 5.45.4-5: normalized package name match | Arch Linux sync databases: expect from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A tool for automating interactive applications | https://www.nist.gov/el/msid/expect.cfm
- zypper - expect - 5.45.4-8.4: normalized package name match | openSUSE Tumbleweed package metadata: expect from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A Tool for Automating Interactive Programs | https://core.tcl-lang.org/expect/
- zypper - expect-devel - 5.45.4-8.4: normalized package name match | openSUSE Tumbleweed package metadata: expect-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Header Files and C API Documentation for expect | https://core.tcl-lang.org/expect/


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [tcl-tk@8](https://www.automicvault.com/pkg/brew/tcl-tk-8/) - Runtime dependency declared by Homebrew.
- [autoconf](https://www.automicvault.com/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [entr](https://www.automicvault.com/pkg/brew/entr/) - Shares av.db curated category or tags: automation, cli, developer-tools, testing.
- [robot-framework](https://www.automicvault.com/pkg/brew/robot-framework/) - Shares av.db curated category or tags: automation, cli, developer-tools, testing.
- [ahoy](https://www.automicvault.com/pkg/brew/ahoy/) - Shares av.db curated category or tags: automation, cli, developer-tools.
- [clive](https://www.automicvault.com/pkg/brew/clive/) - Shares av.db curated category or tags: automation, cli, developer-tools.
- [cmdshelf](https://www.automicvault.com/pkg/brew/cmdshelf/) - Shares av.db curated category or tags: automation, cli, developer-tools.
- [docker-gen](https://www.automicvault.com/pkg/brew/docker-gen/) - Shares av.db curated category or tags: automation, cli, developer-tools.
- [empty](https://www.automicvault.com/pkg/brew/empty/) - Shares av.db curated category or tags: automation, cli, developer-tools.
- [gaze](https://www.automicvault.com/pkg/brew/gaze/) - Shares av.db curated category or tags: automation, cli, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/expect.yml](https://github.com/automic-vault/db/blob/main/combined/expect.yml)


## Sources

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