# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 ncdu

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

## 安装

```sh
sudo av install brew:ncdu
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ncdu
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ncdu
```

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

### Linux

- apk (92%):

```sh
sudo apk add ncdu
```

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

- Debian apt (92%):

```sh
sudo apt install ncdu
```

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

- dnf (92%):

```sh
sudo dnf install ncdu
```

  证据: Fedora Rawhide package metadata: ncdu 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#ncdu
```

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

- pacman (92%):

```sh
sudo pacman -S ncdu
```

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

- zypper (92%):

```sh
sudo zypper install ncdu
```

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

## 软件包事实

- **软件包键:** brew:ncdu
- **软件包管理器:** Homebrew
- **版本:** 2.9.2
- **来源摘要:** NCurses Disk Usage
- **主页:** <https://dev.yorhel.nl/ncdu>
- **最后更新:** 2026-06-14T14:13:25-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ncdu (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.9.2
## 项目历史与用法

ncdu, NCurses Disk Usage, is a text-mode disk usage analyzer built for finding space hogs where a graphical disk viewer is unavailable or unwanted. Upstream explicitly frames it as fast, simple, easy to use, and portable across POSIX-like systems.

### 项目历史

The 1.x release history reaches a first stable release on 2007-04-06. The project matured around practical filesystem inspection: deletion from the UI in 1.1, apparent-size/disk-usage toggling and refresh in 1.3, hard-link detection in 1.6, export/import workflows in 1.9, extended file information in 1.13, and many portability fixes for Linux, macOS, Cygwin, and other Unix-like environments.

The project later split into a maintained C 1.x branch and a Zig 2.x branch. The 2.0 beta line began on 2021-07-22 with features based on ncdu 1.16, lower memory use in many scenarios, and improved hard-link counting; 2.0 followed on 2021-12-21 requiring Zig 0.9. Upstream describes 1.x as an LTS C version that lags on features and performance but remains maintained and usable.

### 采用历史

ncdu is the standout adoption story in this batch. It is packaged across Homebrew, Debian, Ubuntu, Fedora, Arch, Alpine, Nix, MacPorts, and other ecosystems, and the Homebrew formula API response consulted for this July 2026 batch reported 2,878 install-on-request events in 30 days and 56,718 in 365 days.

### 使用方式

The common package-nerd workflow is `ncdu /path` on servers, containers, build machines, and full developer laptops, followed by keyboard navigation into large directories and cautious deletion from inside the TUI. It is also used non-interactively by exporting scans with `-o` and reloading them with `-f`, which is useful when collecting filesystem data from a remote or restricted environment and inspecting it later.

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

ncdu is a canonical example of a small Unix tool that beats heavier GUI alternatives for a frequent operations problem. It sits next to `du`, `find`, and `df`: not replacing them, but turning their disk-usage data into an interactive browser that is comfortable over SSH.

### 时间线

- 2007-04-06: ncdu 1.0 first stable release.
- 2012-09-27: 1.9 added dump-to-file and load-from-file workflows.
- 2018-01-29: 1.13 added extended information mode and experimental color support.
- 2021-07-22: 2.0-beta1 announced the Zig branch based on ncdu 1.16.
- 2025-03-05: 1.22 and 2.8 landed on the maintained C and Zig lines.

### Related projects

- du, ncurses, Zig, POSIX filesystems

### 来源

- <https://dev.yorhel.nl/ncdu>
- <https://dev.yorhel.nl/ncdu/changes>
- <https://dev.yorhel.nl/ncdu/changes2>
- <https://formulae.brew.sh/api/formula/ncdu.json>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/ncdu.conf, ~/.config/ncdu/config
## 其他软件包管理器记录

- Debian apt - ncdu - 1.22-1: normalized package name match | Debian stable package indexes: ncdu from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | ncurses disk usage viewer | https://dev.yorhel.nl/ncdu/
- Nix - ncdu: normalized package name match | nixpkgs package indexes: pkgs/by-name/nc/ncdu/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ncdu - 1.19-0.1: normalized package name match | Ubuntu 24.04 LTS package indexes: ncdu from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | ncurses disk usage viewer | https://dev.yorhel.nl/ncdu/
- apk - ncdu - 1.22-r2: normalized package name match | Alpine Linux edge package indexes: ncdu from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Text-based disk usage viewer | https://dev.yorhel.nl/ncdu
- apk - ncdu-doc - 1.22-r2: normalized package name match | Alpine Linux edge package indexes: ncdu-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Text-based disk usage viewer (documentation) | https://dev.yorhel.nl/ncdu
- dnf - ncdu - 2.11.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: ncdu from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Text-based disk usage viewer | https://github.com/BratishkaErik/ncdu
- pacman - ncdu - 2.9.2-1: normalized package name match | Arch Linux sync databases: ncdu from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Disk usage analyzer with an ncurses interface | https://dev.yorhel.nl/ncdu
- zypper - ncdu - 1.22-1.5: normalized package name match | openSUSE Tumbleweed package metadata: ncdu from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | NCurses Disk Usage | https://dev.yorhel.nl/ncdu/
- MacPorts - ncdu: normalized package name match | MacPorts ports tree: sysutils/ncdu/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
