# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 desktop-file-utils

查看 desktop-file-utils 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:desktop-file-utils
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install desktop-file-utils
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install desktop-file-utils
```

  证据: MacPorts ports tree: gnome/desktop-file-utils/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add desktop-file-utils
```

  证据: Alpine Linux edge package indexes: desktop-file-utils from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install desktop-file-utils
```

  证据: Debian stable package indexes: desktop-file-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install desktop-file-utils
```

  证据: Fedora Rawhide package metadata: desktop-file-utils from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#desktop-file-utils
```

  证据: nixpkgs package indexes: pkgs/by-name/de/desktop-file-utils/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S desktop-file-utils
```

  证据: Arch Linux sync databases: desktop-file-utils from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install desktop-file-utils
```

  证据: openSUSE Tumbleweed package metadata: desktop-file-utils from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:desktop-file-utils
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/desktop-file-utils>
- **版本:** 0.28
- **来源摘要:** Command-line utilities for working with desktop entries
- **主页:** <https://wiki.freedesktop.org/www/Software/desktop-file-utils/>
- **上游文档:** <https://wiki.freedesktop.org/www/Software/desktop-file-utils/>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.28.tar.xz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- desktop-file-edit (cli)
- desktop-file-install (cli)
- desktop-file-validate (cli)
- update-desktop-database (cli)
- desktop-file-edit (别名)
- desktop-file-install (别名)
- desktop-file-validate (别名)
- update-desktop-database (别名)

## 依赖

- gettext
- glib

## 构建依赖

- meson
- ninja
- pkgconf

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.28
- 本地数据: OK
- 上游仓库: https://wiki.freedesktop.org/www/Software/desktop-file-utils/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

desktop-file-utils is a freedesktop.org utility collection for working with desktop entry files. Its commands validate .desktop files, install or edit them, and update the MIME-type cache derived from desktop entries.

### 项目历史

The release archive starts with version 0.1 in September 2003, and the NEWS file describes that initial release as containing desktop-file-validate and desktop-file-install. Over time the project added update-desktop-database, support for newer desktop-entry specification versions, Meson builds, and a wider set of recognized desktop environments.

### 采用历史

desktop-file-utils became part of the practical plumbing of Linux desktop packaging because application packages ship .desktop launchers and MIME handlers that need validation and cache updates. The freedesktop.org page documents development in the xdg/desktop-file-utils GitLab repository and release tarballs on freedesktop.org.

### 使用方式

Packagers and desktop maintainers use desktop-file-validate to catch desktop-entry specification violations, desktop-file-install and desktop-file-edit to install or modify entries, and update-desktop-database to rebuild the cache of MIME types handled by desktop files.

### 为什么软件包爱好者会关心

For package nerds, desktop-file-utils is classic Linux desktop infrastructure: it rarely appears in screenshots, but it enforces the metadata that makes launchers, menus, MIME associations, and desktop integration work consistently across distributions.

### 时间线

- 2003: Version 0.1 initial release contained desktop-file-validate and desktop-file-install.
- 2004: Version 0.7 added update-desktop-database.
- 2020: Version 0.25 added Meson build support and deprecated Autotools.
- 2023: Version 0.27 removed Autotools support and added desktop spec 1.5 support.
- 2024: Version 0.28 was released.

### Related projects

- Related freedesktop.org standards include the Desktop Entry Specification and the broader XDG desktop integration specifications.

### 来源

- <https://www.freedesktop.org/wiki/Software/desktop-file-utils>
- <https://www.freedesktop.org/software/desktop-file-utils/releases/>
- <https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/raw/master/NEWS>


## 安全说明

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

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** desktop-file-utils
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - desktop-file-utils - 0.28-1: normalized package name match | Debian stable package indexes: desktop-file-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Utilities for .desktop files | https://www.freedesktop.org/wiki/Software/desktop-file-utils
- Nix - desktop-file-utils: normalized package name match | nixpkgs package indexes: pkgs/by-name/de/desktop-file-utils/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - desktop-file-utils - 0.27-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: desktop-file-utils from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Utilities for .desktop files | https://www.freedesktop.org/wiki/Software/desktop-file-utils
- apk - desktop-file-utils - 0.28-r0: normalized package name match | Alpine Linux edge package indexes: desktop-file-utils from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command line utilities for working with desktop entries | https://www.freedesktop.org/wiki/Software/desktop-file-utils
- apk - desktop-file-utils-doc - 0.28-r0: normalized package name match | Alpine Linux edge package indexes: desktop-file-utils-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command line utilities for working with desktop entries (documentation) | https://www.freedesktop.org/wiki/Software/desktop-file-utils
- apk - desktop-file-utils-emacs - 0.28-r0: normalized package name match | Alpine Linux edge package indexes: desktop-file-utils-emacs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Emacs mode for desktop-file-utils | https://www.freedesktop.org/wiki/Software/desktop-file-utils
- dnf - desktop-file-utils - 0.28-8.fc45: normalized package name match | Fedora Rawhide package metadata: desktop-file-utils from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Utilities for manipulating .desktop files | https://www.freedesktop.org/software/desktop-file-utils
- pacman - desktop-file-utils - 0.28-1: normalized package name match | Arch Linux sync databases: desktop-file-utils from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command line utilities for working with desktop entries | https://www.freedesktop.org/wiki/Software/desktop-file-utils
- zypper - desktop-file-utils - 0.28-3.4: normalized package name match | openSUSE Tumbleweed package metadata: desktop-file-utils from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Utilities for Manipulating Desktop Files | https://www.freedesktop.org/wiki/Software/desktop-file-utils
- MacPorts - desktop-file-utils: normalized package name match | MacPorts ports tree: gnome/desktop-file-utils/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Documentation packages](https://pkg.so/zh-hans/documentation-tools/) - Matched documentation, manual, or publishing metadata.
- [glib](https://pkg.so/zh-hans/brew/glib/) - Runtime dependency declared by Homebrew.
- [gettext](https://pkg.so/zh-hans/brew/gettext/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ninja](https://pkg.so/zh-hans/brew/ninja/) - Build dependency declared by Homebrew.
- [meson](https://pkg.so/zh-hans/brew/meson/) - Build dependency declared by Homebrew.
- [file-roller](https://pkg.so/zh-hans/brew/file-roller/) - Popular package that depends on this formula.
- [lxi-tools](https://pkg.so/zh-hans/brew/lxi-tools/) - Popular package that depends on this formula.
- [shared-mime-info](https://pkg.so/zh-hans/brew/shared-mime-info/) - Shares pkgdb curated category or tags: cli, desktop-integration, freedesktop, system, xdg.
- [duti](https://pkg.so/zh-hans/brew/duti/) - Shares pkgdb curated category or tags: cli, desktop-integration, system.
- [trash-cli](https://pkg.so/zh-hans/brew/trash-cli/) - Shares pkgdb curated category or tags: cli, freedesktop, system.
- [appstream](https://pkg.so/zh-hans/brew/appstream/) - Shares pkgdb curated category or tags: cli, freedesktop, system.
- [xdg-ninja](https://pkg.so/zh-hans/brew/xdg-ninja/) - Shares pkgdb curated category or tags: cli, system, xdg.
- [gtrash](https://pkg.so/zh-hans/brew/gtrash/) - Shares pkgdb curated category or tags: cli, freedesktop, system.
- [xz](https://pkg.so/zh-hans/brew/xz/) - Shares pkgdb curated category or tags: cli, system.
- [zstd](https://pkg.so/zh-hans/brew/zstd/) - Shares pkgdb curated category or tags: cli, system.
- [dbus-glib](https://pkg.so/zh-hans/brew/dbus-glib/) - Local package facts share a topical domain. Shared terms: cli, gettext, glib, system.
- [dbus](https://pkg.so/zh-hans/brew/dbus/) - Local package facts share a topical domain. Shared terms: cli, desktop, system, update.

## Combined YAML source

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


## 来源

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