# Install gtk4 with Homebrew, apt, dnf, MacPorts, Nix, pacman, zypper

Toolkit for creating graphical user interfaces. Version 4.22.4 via Homebrew; verified 2026-07-07.

## Install

```sh
sudo av install brew:gtk4
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gtk4
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gtk4
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install gir1.2-gtk-4.0
```

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

- dnf (92%):

```sh
sudo dnf install gtk4
```

  Evidence: Fedora Rawhide package metadata: gtk4 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#gtk4
```

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

- pacman (92%):

```sh
sudo pacman -S gtk4
```

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

- zypper (92%):

```sh
sudo zypper install gettext-its-gtk4
```

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

## Package facts

- **Package key:** brew:gtk4
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gtk4>
- **Version:** 4.22.4
- **Source summary:** Toolkit for creating graphical user interfaces
- **Homepage:** <https://gtk.org/>
- **Repository:** <https://gitlab.gnome.org/GNOME/gtk>
- **Upstream docs:** <https://docs.gtk.org/gtk4>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://download.gnome.org/sources/gtk/4.22/gtk-4.22.4.tar.xz>
- **Last updated:** 2026-07-07T06:58:43Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gtk4-builder-tool (cli)
- gtk4-demo (cli)
- gtk4-demo-application (cli)
- gtk4-encode-symbolic-svg (cli)
- gtk4-icon-editor (cli)
- gtk4-image-tool (cli)
- gtk4-launch (cli)
- gtk4-node-editor (cli)
- gtk4-path-tool (cli)
- gtk4-print-editor (cli)
- gtk4-query-settings (cli)
- gtk4-rendernode-tool (cli)
- gtk4-update-icon-cache (cli)
- gtk4-widget-factory (cli)
- gtk4-builder-tool (alias)
- gtk4-demo (alias)
- gtk4-demo-application (alias)
- gtk4-encode-symbolic-svg (alias)
- gtk4-icon-editor (alias)
- gtk4-image-tool (alias)
- gtk4-launch (alias)
- gtk4-node-editor (alias)
- gtk4-path-tool (alias)
- gtk4-print-editor (alias)
- gtk4-query-settings (alias)
- gtk4-rendernode-tool (alias)
- gtk4-update-icon-cache (alias)
- gtk4-widget-factory (alias)

## Dependencies

- cairo
- fontconfig
- fribidi
- gdk-pixbuf
- gettext
- glib
- graphene
- harfbuzz
- hicolor-icon-theme
- jpeg-turbo
- libepoxy
- libpng
- librsvg
- libtiff
- pango

## Build dependencies

- dart-sass
- docbook
- docbook-xsl
- docutils
- gettext
- gobject-introspection
- meson
- ninja
- pkgconf

## Uses from macOS

- cups

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.22.4
- Package-manager updated: 2026-07-07
- Local data: ok
- Upstream repository: https://gtk.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

GTK is the GNOME-maintained, LGPL-licensed widget toolkit for graphical applications. The Homebrew gtk4 package represents the GTK 4 API and tool track: development headers, libraries, demos, builder tools, icon tools, inspectors, and utility programs used by applications and language bindings that target GTK 4.

### Project history

The GTK project site describes GTK as a free and open-source cross-platform widget toolkit maintained by GNOME and contributors, built on GLib, and suitable for applications ranging from small tools to application suites. The site also identifies GTK as hosted by GNOME and maintained by the GTK Team, with project copyright dating from 1997.

GTK's major-version history is visible through GNOME source tarballs and upstream migration documentation. GTK 2.0 source tarballs are published from March 2002; GTK 3.0 source tarballs are published from February 2011; and GTK 4.0 tarballs are published from December 2020. The GTK 4 migration guide explicitly treats GTK 4 as a new major version that breaks API and ABI compared with GTK 3.x, and recommends preparing applications from the final stable GTK 3.24 series.

GTK 4 development began as a multi-year effort around the 3.89.1 development release in November 2016. The GTK 4.0 release announcement says the 4.0 result came after more than 18,000 commits and more than 20 development releases, with major themes including render nodes, event controllers, layout managers, media playback, scalable lists, shaders, data transfers, and accessibility.

The gtk4 package role should be read as a version-track role, not a separate unrelated project. It packages the GTK 4 generation of the same toolkit lineage, alongside language bindings and applications that choose the GTK 4 API. The package's executables such as gtk4-demo, gtk4-widget-factory, gtk4-builder-tool, gtk4-launch, and gtk4-query-settings are developer and diagnostic tools around the library.

### Adoption history

GTK's adoption is tied to GNOME but not limited to it. The GTK project site describes GTK as the core of the GNOME development platform and also suitable for other Linux environments plus Windows and macOS targets. Its homepage lists applications built with GTK such as GIMP, Inkscape, Evolution, Web, Calculator, Maps, Transmission, and others.

GTK 4 adoption started as a porting path for applications and platform libraries after the 4.0 release. The GTK 4.0 announcement called out GNOME 40 applications and adjacent libraries such as vte, WebKitGTK, and GtkSourceView as parts of the ecosystem that needed GTK 4 ports.

### How it is used

Developers use GTK 4 by linking against the Gtk 4.0 API, using the official API reference and getting-started guides, and optionally using language bindings for C, JavaScript, Perl, Python, Rust, Vala, C++, and other languages. GTK applications are event-driven widget hierarchies, often assembled through code or GtkBuilder UI descriptions.

Packagers and developers use gtk4 command-line tools for demos, widget inspection, resource and UI conversion, icon cache updates, builder-file validation, launching applications, print testing, settings queries, render-node inspection, and visual experiments. Those tools make gtk4 a developer-platform package even when a desktop user sees it only as an application dependency.

### Why package nerds care

gtk4 is one of the packages that defines a desktop stack. Its ABI, introspection metadata, demos, schemas, icons, input modules, themes, and build flags influence a large set of reverse dependencies, especially in GNOME and GTK language-binding ecosystems.

The package is also a marker of a major toolkit transition. GTK 4 changes rendering and input architecture compared with GTK 3, removes long-deprecated APIs, and requires applications and related libraries to make deliberate porting decisions. For package maintainers, it sits at the intersection of C ABI stability, GObject Introspection, Meson builds, platform backends, accessibility, and downstream application migration.

### Timeline

- 1997: The GTK project site copyright range begins, reflecting the early GTK project era.
- 2002-03-08: GNOME publishes GTK+ 2.0.0 source tarballs.
- 2011-02-10: GNOME publishes GTK+ 3.0.0 source tarballs.
- 2016-11: The GTK 4.0 announcement identifies 3.89.1 as the development point after which the GTK 4 effort added more than 18,000 commits.
- 2020-12-16: GTK 4.0 is released and source tarballs are published.
- 2021-03: GNOME 40 is identified in the GTK 4.0 announcement as an early adoption target for GTK 4 applications.
- 2023-09: GNOME Translation Editor 45.1 records a GTK 4 and libadwaita migration, one example of downstream GTK 4 application porting.

### Related projects

- GLib is the foundational utility and object-system library below GTK.
- GObject Introspection and language bindings allow GTK APIs to be used from several languages.
- GNOME is the primary desktop platform around GTK.
- vte, WebKitGTK, GtkSourceView, libadwaita, GIMP, Inkscape, Evolution, and GNOME applications are important ecosystem consumers or related libraries.

### Sources

- <https://blog.gtk.org/2020/>
- <https://blog.gtk.org/2020/12/16/gtk-4-0/>
- <https://docs.gtk.org/gtk4/>
- <https://docs.gtk.org/gtk4/migrating-3to4.html>
- <https://download.gnome.org/sources/gtk%2B/2.0/>
- <https://download.gnome.org/sources/gtk%2B/3.0/>
- <https://download.gnome.org/sources/gtk/4.0/>
- <https://www.gtk.org/>
- <https://www.gtk.org/docs/getting-started/index>


## 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:** gtk4
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - gir1.2-gtk-4.0 - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: gir1.2-gtk-4.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GTK graphical user interface library -- gir bindings | https://www.gtk.org/
- Debian apt - gtk-4-examples - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: gtk-4-examples from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | example files for GTK 4 | https://www.gtk.org/
- Debian apt - gtk-4-tests - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: gtk-4-tests from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | "as-installed" tests for GTK 4 | https://www.gtk.org/
- Debian apt - gtk-update-icon-cache - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: gtk-update-icon-cache from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | icon theme caching utility | https://www.gtk.org/
- Debian apt - libgtk-4-1 - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: libgtk-4-1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GTK graphical user interface library | https://www.gtk.org/
- Debian apt - libgtk-4-bin - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: libgtk-4-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | programs for the GTK graphical user interface library | https://www.gtk.org/
- Debian apt - libgtk-4-common - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: libgtk-4-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | common files for the GTK graphical user interface library | https://www.gtk.org/
- Debian apt - libgtk-4-dev - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: libgtk-4-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | development files for the GTK library | https://www.gtk.org/
- Debian apt - libgtk-4-doc - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: libgtk-4-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | documentation for the GTK graphical user interface library | https://www.gtk.org/
- Debian apt - libgtk-4-media-gstreamer - 4.18.6+ds-2: normalized package name match | Debian stable package indexes: libgtk-4-media-gstreamer from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GStreamer media backend for the GTK graphical user interface library | https://www.gtk.org/
- Nix - gtk4: normalized package name match | nixpkgs package indexes: pkgs/by-name/gt/gtk4/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gir1.2-gtk-4.0 - 4.14.2+ds-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-gtk-4.0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GTK graphical user interface library -- gir bindings | https://www.gtk.org/
- Ubuntu apt - gtk-4-examples - 4.14.2+ds-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gtk-4-examples from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | example files for GTK 4 | https://www.gtk.org/
- Ubuntu apt - gtk-4-tests - 4.14.2+ds-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gtk-4-tests from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | "as-installed" tests for GTK 4 | https://www.gtk.org/
- Ubuntu apt - libgtk-4-1 - 4.14.2+ds-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: libgtk-4-1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GTK graphical user interface library | https://www.gtk.org/
- Ubuntu apt - libgtk-4-bin - 4.14.2+ds-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: libgtk-4-bin from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | programs for the GTK graphical user interface library | https://www.gtk.org/


## 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.
- [cairo](https://www.automicvault.com/pkg/brew/cairo/) - Runtime dependency declared by Homebrew.
- [fontconfig](https://www.automicvault.com/pkg/brew/fontconfig/) - Runtime dependency declared by Homebrew.
- [fribidi](https://www.automicvault.com/pkg/brew/fribidi/) - Runtime dependency declared by Homebrew.
- [gdk-pixbuf](https://www.automicvault.com/pkg/brew/gdk-pixbuf/) - Runtime dependency declared by Homebrew.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [glib](https://www.automicvault.com/pkg/brew/glib/) - Runtime dependency declared by Homebrew.
- [harfbuzz](https://www.automicvault.com/pkg/brew/harfbuzz/) - Runtime dependency declared by Homebrew.
- [dart-sass](https://www.automicvault.com/pkg/brew/dart-sass/) - Build dependency declared by Homebrew.
- [docbook](https://www.automicvault.com/pkg/brew/docbook/) - Build dependency declared by Homebrew.
- [docbook-xsl](https://www.automicvault.com/pkg/brew/docbook-xsl/) - Build dependency declared by Homebrew.
- [docutils](https://www.automicvault.com/pkg/brew/docutils/) - Build dependency declared by Homebrew.
- [baobab](https://www.automicvault.com/pkg/brew/baobab/) - Popular package that depends on this formula.
- [blueprint-compiler](https://www.automicvault.com/pkg/brew/blueprint-compiler/) - Popular package that depends on this formula.
- [czkawka](https://www.automicvault.com/pkg/brew/czkawka/) - Popular package that depends on this formula.
- [dissent](https://www.automicvault.com/pkg/brew/dissent/) - Popular package that depends on this formula.
- [file-roller](https://www.automicvault.com/pkg/brew/file-roller/) - Popular package that depends on this formula.
- [freeciv](https://www.automicvault.com/pkg/brew/freeciv/) - Popular package that depends on this formula.
- [ghex](https://www.automicvault.com/pkg/brew/ghex/) - Popular package that depends on this formula.
- [gnome-builder](https://www.automicvault.com/pkg/brew/gnome-builder/) - Popular package that depends on this formula.
- [gtk+](https://www.automicvault.com/pkg/brew/gtk/) - Package name indicates the same formula family.
- [gtk+3](https://www.automicvault.com/pkg/brew/gtk-3/) - Package name indicates the same formula family.

## Combined YAML source

View the package source record on GitHub. [combined/gtk4.yml](https://github.com/automic-vault/db/blob/main/combined/gtk4.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
