How To Find Arch Linux Packages Using the Most Disk Space

Keeping an Arch system lean is part of its appeal, but over time, packages, cached files, and dependencies can quietly eat up disk space. Knowing which Arch packages are taking the largest disk space helps you decide what to remove, compress, or move elsewhere.

This guide walks through practical ways to identify space-heavy packages on Arch Linux (and Arch-based distros like Manjaro and EndeavourOS) without assuming you’re a command-line expert.


What “Largest Packages” Really Means on Arch

When people say “largest packages” on Arch, they might actually be talking about three different things:

  1. Installed package size
    How much disk space a package (and its files) currently uses under /usr, /opt, etc.

  2. Uncompressed package contents
    How big a package becomes once installed, compared to the compressed .pkg.tar.zst file in the cache.

  3. Package cache size
    Old package versions stored in /var/cache/pacman/pkg, which can be huge even if the installed package is not.

Different tools show different aspects of this. Understanding that distinction helps you interpret what you’re seeing:

Type of sizeWhere it livesTypical tool
Installed files size/usr, /opt, etc.pacman -Qi, pacgraph, du
Compressed package size/var/cache/pacman/pkgls, du, ncdu
Total cache size (all pkgs)/var/cache/pacman/pkgdu, paccache, ncdu

Most people asking this question want the installed package size, but it’s useful to check all three, because they reveal different disk hogs.


Quick Way: List Largest Installed Packages with pacman

Arch’s package manager, pacman, can show package sizes, but it doesn’t have a built-in “sort by size” view. You can combine it with basic shell tools to get a ranked list.

Show top N largest installed packages

You can use this pattern to list packages by installed size:

pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5 " " name}' | sort -hr | head -n 20 

What this does in plain language:

  • pacman -Qi prints detailed info for every installed package.
  • awk grabs the Name and Installed Size lines and prints lines like 500MiB package-name.
  • sort -hr sorts human-readable sizes (MiB, GiB) in reverse (largest first).
  • head limits output (20 packages in this example).

You can tweak the head -n 20 part to show more or fewer:

  • Top 10 packages: head -n 10
  • Top 50 packages: head -n 50

This view is useful if you want to quickly see which installed packages are dominating disk usage.

Check a single package’s installed size

If you suspect a specific package:

pacman -Qi package-name | grep -E 'Name|Installed Size' 

You’ll see something like:

  • Name : package-name
  • Installed Size : 512.00 MiB

Visual Way: Use pacgraph to See Big Dependencies

If you prefer a more visual breakdown, pacgraph builds a map of installed packages with their sizes.

  1. Install pacgraph from the official repos:

    sudo pacman -S pacgraph 
  2. Run it in a terminal (simple text view):

    pacgraph 
  3. Or generate a PNG graph (more visual, especially for large systems):

    pacgraph -p > pacgraph.png 

Key ideas:

  • Large blocks represent packages with a lot of installed size.
  • You’ll often see that a few meta-packages (e.g., big desktop environments, IDEs, or toolchains) pull in many large dependencies.

This helps you understand not just which package is big, but how groups of packages add up.


Don’t Forget the Pacman Cache: Old Packages Can Be Huge

Arch keeps copies of downloaded packages in /var/cache/pacman/pkg. Over months or years, this can quietly accumulate gigabytes of data, especially if you update often.

Check total cache size

sudo du -sh /var/cache/pacman/pkg 

You’ll get a summary like 4.5G /var/cache/pacman/pkg.

See which cached files are biggest

cd /var/cache/pacman/pkg ls -lhS | head -n 20 

This lists the 20 largest package files in the cache. These are compressed archives, so their installed size is often even larger.

Clean up old cached packages (carefully)

Arch provides paccache in the pacman-contrib package.

  1. If needed, install it:

    sudo pacman -S pacman-contrib 
  2. Keep the last 3 versions of each package (recommended default pattern):

    sudo paccache -r 
  3. For more aggressive cleanup, e.g., keep only the latest version:

    sudo paccache -rk1 
    • -r removes unused packages.
    • -k1 keeps 1 version.

This doesn’t affect installed packages themselves; it just trims old downloads that are no longer needed for upgrades or quick downgrades.


File-System View: Find Big Directories, Then Map to Packages

Sometimes it’s easier to start with: “What directories are huge?” and then ask, “Which packages own these files?”

Find the biggest directories

Use du (disk usage) on system directories:

sudo du -xh /usr /opt /var | sort -h | tail -n 20 
  • du -xh gives human-readable sizes and counts each file once.
  • sort -h sorts by size.
  • tail -n 20 shows the biggest entries.

If you find, for example, /usr/share/icons or /usr/lib/... is massive, that’s your starting clue.

See which package owns a file or directory

Once you see a big folder, pick a representative file inside it and ask pacman:

pacman -Qo /path/to/file 

This tells you which package “owns” that file. By sampling a few files in the big directory, you can discover the major packages responsible for that space.


Using ncdu for Interactive Disk Usage Browsing

If you want a point-and-browse way to explore disk usage in the terminal, ncdu is handy.

  1. Install ncdu (often in the community repo):

    sudo pacman -S ncdu 
  2. Scan the root filesystem (this can take a while):

    sudo ncdu / 
  3. Or target specific locations:

    sudo ncdu /usr sudo ncdu /var/cache/pacman/pkg 

You’ll get an interactive list of directories and files sorted by size. When you spot something huge, you can:

  • Note its path.
  • Use pacman -Qo <some-file> to find the owning package.
  • Or decide if it’s user data, logs, or caches instead of package content.

Variables That Change Which Packages Are “Largest”

Two Arch systems with the same base install can look completely different in disk usage based on how they’re used. Several factors affect which packages end up dominating your storage:

1. Desktop environment and GUI stack

  • Full desktop (GNOME, KDE Plasma) pulls in:
    • Large libraries
    • Icon themes
    • Language packs
    • Helper tools and services
  • Minimal window manager (i3, bspwm, sway) usually:
    • Uses fewer dependencies
    • Has smaller overall installed size

The more “batteries included” your desktop is, the more large packages you’ll see.

2. Development tools and SDKs

  • Compilers and toolchains (C/C++, Java, Rust, etc.)
  • Android development tools and emulators
  • Large IDEs

These often include multiple runtimes, debuggers, and libraries, each adding a significant chunk of disk usage.

3. Media and content creation software

  • Video editors, 3D modeling tools, digital audio workstations
  • Sample libraries, plugins, and textures

Here, “package size” might be small but data and content stored under /usr/share or /opt can be huge.

4. Gaming and compatibility layers

  • Gaming platforms and clients
  • Wine/Proton environments
  • 32‑bit runtime libraries

These can quietly install large sets of libraries and compatibility layers that take up several gigabytes.

5. System age and update history

  • Long-running installs accumulate:
    • Old kernel images
    • Unused libraries
    • Large pacman caches
  • Systems updated frequently with pacman -Syu tend to have more artifacts in /var/cache/pacman/pkg unless regularly cleaned.

An old Arch install that’s never cleaned can have very different “top offenders” from a fresh install, even with similar packages.


Different User Profiles, Different Largest Packages

Because the mix of packages and data is so varied, “largest packages” looks very different depending on who’s using the system.

Minimalist / terminal-focused user

  • Likely largest packages:
    • Web browser
    • Terminal multiplexer or shell tools (but usually not huge)
    • A few libraries used by multiple tools
  • Disk usage is dominated more by user data than by packages.

Full desktop user (GNOME, KDE, etc.)

  • Likely largest packages:
    • Desktop environment meta-packages
    • Office suites
    • Browsers
    • Icon and theme packs
  • You often see fewer but very large meta-packages dominating the list.

Developer / power user

  • Likely largest packages:
    • Programming language runtimes
    • SDKs and build tools
    • Database servers or containers
  • Some of the “largest packages” are essential for their work, even if they take gigabytes.

Creative / media-heavy user

  • Likely largest packages:
    • Video editors or DAWs
    • Plugins, fonts, sample packs (sometimes packaged, sometimes not)
  • A lot of disk usage appears under /usr/share, /opt, and home directories, not just in clearly labeled “big” packages.

Why the “Right” Cleanup Strategy Depends on Your Setup

Finding which Arch packages take the largest disk space is mostly a matter of combining:

  • pacman -Qi + text filters to list big installed packages
  • du / ncdu to inspect directories
  • pacman -Qo to map files back to packages
  • paccache and manual checks to handle the cache

Those tools are the same for everyone, but what you decide to do with the information is where things diverge.

On one system, removing a large IDE or an unused desktop environment might free tens of gigabytes without any downside. On another, the same packages might be central to daily work. For some people, the main win is trimming the pacman cache; for others, it’s identifying one or two heavyweight packages they no longer use.

Once you know how to see the biggest packages and directories, the remaining piece is your own situation: which applications you rely on, how much storage you have, and how comfortable you are uninstalling or reconfiguring parts of your Arch system.