r/archlinux • • Jul 04 '18

FAQ - Read before posting

584 Upvotes

First read the Arch Linux FAQ from the wiki

Code of conduct

How do I ask a proper question?

Smart Questions
XYProblem
Please follow the standard list when giving a problem report.

What AUR helper should I use?

There are no recommended AUR helpers. Please read over the wiki entry on AUR helpers. If you have a question, please search the subreddit for previous questions.

If your AUR helper breaks know how to use makepkg manually.

I need help with $derivativeDistribution

Use the appropriate support channel for your distribution. Arch is DIY distribution and we expect you to guide us through your system when providing support. Using an installer defeats this expectation.

Why was the beginners guide removed?

It carried a lot of maintenance on the wiki admin as it duplicated a lot of information, and everyone wanted their addition included. It was scrapped for a compact model that largely referenced the main wiki pages.

Why Arch Linux?

Arch compared to other distributions

Follow the wiki. Random videos are unsupported.

<plug>Consider getting involved in Arch Linux!</plug>


r/archlinux • • 12h ago

SUPPORT Unsafe Shutdowns counter keeps rising on my NVMe drives

17 Upvotes

I have a Lenovo Gaming 3 15ARH7 laptop. At first, Arch Linux was installed on a Micron MTFDKCD512TFK, and the Unsafe Shutdowns counter rose on that drive too while Arch was running from it. Later I bought an HP SSD FX900 Plus 512GB and installed Arch Linux on it. Windows is now on the Micron drive.

Since I bought the HP drive, its Unsafe Shutdowns counter has been rising almost every time I shut down or reboot. Over the last few days it went from 188 to 194, and I can’t find a pattern. I shut down normally, through the KDE menu, and I’ve tried everything I could find. I checked SMART, which shows no media errors and about 1% wear. I also checked for firmware updates: fwupd finds none for the HP drive, and I can’t update the laptop’s BIOS myself bcz windows only, and I don’t expect a BIOS update for this model anymore. btrfs device stats is clean, and a btrfs scrub finished with no errors. The shutdown logs end cleanly, with /home, /boot and /tmp unmounted before power-off, and there are no suspend or lid events in the journal.

I’ve searched forums, documentation, and asked AI assistants about this, and I’ve followed the suggestions I could find. The most I got was logs, and those show nothing abnormal to me or to the tools I asked. I still don’t know why the counter keeps rising, and I’d like to find out what it means in practice and what I should do and I don’t want to go back to Windows because of this, but the fact that the counter keeps rising bothers me a lot, and I’d rather understand it than ignore it.

Model name: AMD Ryzen 5 6600H with Radeon Graphics
Model Number: Micron MTFDKCD512TFK
Firmware Version: 7003V5LN
Firmware Updates (0x14): 2 Slots, no Reset required
Percentage Used: 7%
Power On Hours: 5,540
Unsafe Shutdowns: 907
Media and Data Integrity Errors: 0
Model Number: HP SSD FX900 Plus M.2 512GB
Firmware Version: SN25043
Firmware Updates (0x14): 2 Slots, no Reset required
Percentage Used: 1%
Power On Hours: 138
Unsafe Shutdowns: 194
Media and Data Integrity Errors: 0

OS: Arch Linux x86_64
Host: 82SB (IdeaPad Gaming 3 15ARH7)
Kernel: Linux 7.2.11-arch1-1
CPU: AMD Ryzen 5 6600H (12) @ 4.57 GHz
GPU 1: NVIDIA GeForce RTX 3050 Mobile [Discrete]
GPU 2: AMD Radeon 660M [Integrated]

I’ve had the Lenovo for about two years, and I bought the HP drive almost a year ago. I don’t remember the exact date.


r/archlinux • • 1h ago

QUESTION Calendar with Apple calendar sync support and VIM keys

• Upvotes

Hey, guys. I look for a calendar that would support sync with my Apple calendar and preferably had VIM keys support. I currently use rencal, but I would like something that I don't have to grab from the AUR.


r/archlinux • • 3h ago

SUPPORT How to isolate an AMD dGPU and only be used when explicitly requested via DRI_PRIME=1

0 Upvotes

Idk what happened, it worked till recently, but basically on my laptop, I used the dGPU only when I was playing games, but recently apps like Firefox, and Kwin Wayland / XWaylandd keep pinging my dGPU and waking it up, and that makes my system stutter

  Host: HP Victus Laptop 16-e0xxx
  DE/WM: KDE Plasma 6.8.1 on KWin (Wayland)
  GPUs: AMD Radeon Vega [iGPU] + AMD Radeon RX 5500M [dGPU]

r/archlinux • • 13h ago

SUPPORT | SOLVED Trouble upgrading system due to libarchive

4 Upvotes

Was trying to do a routine system update, got a little behind on them on this computer (about a months worth). When I go to upgrade through either pacman or yay I get the same error:
error: failed to prepare transaction (could not satisfy dependencies) :: installing libarchive (3.8.10-1) breaks dependency 'libarchive=3.8.9' required by lib32-libarchive

Not sure how to rectify this :/

Full read out of pacman:

sudo pacman -Syu
[sudo] password for user:   
:: Synchronizing package databases...  
core is up to date  `
extra is up to date  `
multilib is up to date  `
:: Starting full system upgrade...  `
resolving dependencies...  `
looking for conflicting packages...  
:: plasma-workspace-6.8.1-1 and plasma-x11-session-6.7.5-1 are in conflict. Remove plasma-x11-session? [y/N] y  `
error: failed to prepare transaction (could not satisfy dependencies)  `
:: installing libarchive (3.8.10-1) breaks dependency 'libarchive=3.8.9' required by lib32-libarchive `

r/archlinux • • 1h ago

SHARE Linux Support for HyperFlux v2 (I’m looking for a few testers before release)

• Upvotes

Hey y'all. I’ve been working on linux support for the hyperflux V2 receiver, and it’s close to release (planned for 8 November, I hope)

What it does through the receiver:

-battery level and charging for those mouse and keyboard in the desktop’s battery widget
-lighting, effects in openrazer and polychromatic
-new plugin in openrgb

typing and pointing already work on linux so this is about everything else

It works on my basilisk v3 pro 35k and deathstalker v2 pro tkl, razer lists more devices for the receiver so I’d like to confirm them before a big release. If you have a hyperflux v2 and one of these:

-naga v2 pro or naga v3 pro

-Basilisk v3 Pro (35k phantom green too)

-cobra pro

-blackwidow v3 pro or a blackwidow v4 mini or perhaps low tkl or tkl hyperspeed

-deathStalker v2 pro

-also contact if you got basilisk v4 pro or hyperspeed

and you use arch, ubuntu 26.10, debian 14, fedora 44 or opensuse yumble, I’d love your help. it’s approx 15 minutes to install, a reboot, then a 3 minute guided test for me to confirm

comment or dm me your GitHub username and I’ll add you to the repo

owners of a 35K or a deathstalker v2 pro tkl are welcome, since a second setup should help

I’ve personally tested the devices I own. I only used ai to test devices I didn’t have, I wanted to make sure every Razer device works perfectly (ngl, I’m still not sure as there are no real testers to tell me otherwise)

I dunno how to share images


r/archlinux • • 1d ago

DISCUSSION Is there a reason to localize the Arch wiki?

34 Upvotes

Recently I have started localizing a few of the more important pages on the Arch wiki to my native language (Hungarian), while it is fun I'm curious if its actually useful because most people do speak english nowdays, since more then half of the Earth speaks it in some capacity.


r/archlinux • • 4h ago

SUPPORT Downloaded Cisco Packet Tracer and my computer password doesn’t work anymore.

0 Upvotes

For context, I’m fairly new to arch Linux and Linux in general and I changed my operating system over the summer. I run it on a maybe 20 year old MacBook so it’s not the best but it works.

I needed Cisco packet tracer for my cybersecurity class so I worked with my instructor and we figured it out. We downloaded the Ubuntu file from the Arch Linux website and changed the file in terminal to run for Arch.

It worked, but when I got home my password wasn’t working anymore and I’m just completely logged out still. I tried researching it and some sources say my Linux may have been corrupted but I’m still confused and unsure how to fix it. Can anyone help please? I will drown in work if I don’t have my home computer back soon.


r/archlinux • • 18h ago

DISCUSSION Niri + DMS

4 Upvotes

So, when did Niri + DMS become an install option? I was installing Arch for the first time in a while and was quite surprised to see that. Unfortunately I had issues installing it on a VM but that might just be my setup, or the DMS rebranding stuff. However.. Cool! I'd been waiting for a distro with those two awesome packages as an option. Of course I just discover it after going through trials and such building out a Fedora Atomic config of my own with both already installed.


r/archlinux • • 22h ago

DISCUSSION Issue with TPM 2.0 on T480 stock firmware, wanting to check if coreboot/libreboot would fix this. Looking for testers with any similar hardware on any firmware version.

Thumbnail
5 Upvotes

r/archlinux • • 9h ago

SHARE [Request/Guide] Installing proprietary Nvidia drivers 580 for 1000 series or older

0 Upvotes

Hello,

I noticed a fairly broad use but lacking documentation, especially for average users, on how to deal with legacy nvidia drivers 580 or older from AUR, specifically the wiki article provides nothing but a generic link to Arch user repository package, with as far as I can tell not instructions on how to get them installed and sorted. This is not at the level "batteries not included, read the wiki" this is at the level "discontinued support, figure it out on your own" and chances are even people that have used mainstream Linux distros for years will be left wondering what to do exactly.

https://wiki.archlinux.org/title/NVIDIA

https://aur.archlinux.org/packages/nvidia-580xx-dkms

If that is your situation, this simple guide might prove useful however it is not complete/correct for all use cases.

__________

Part A - Guide

For nvidia graphics card users of 1000 series or older supported by nvidia proprietary driver 580 (though it can be adapted for older driver version hosted on the AUR for legacy nvidia cards), use the following steps and note it assumes LTS or latest Linux kernel (zen kernel require specifically linux-zen-headers for part 2) and the nouveau is used at the moment and ideally running an X11 based DE, the driver may have unresolved bugs or unsupported features for Wayland compositors (blame nvidia).

1 Modify the following config

sudo nano /etc/pacman.conf

[options]

...

IgnorePkg = nvidia nvidia-utils nvidia-dkms nvidia-open nvidia-open-dkms

..

[multilib]

Include = /etc/pacman.d/mirrorlist

Make sure the above are uncommented or exist, the first tells to ignore the nvidia-open drivers which do not work on 1000 series and older, if this is not mentioned here it will interfere with the drivers you install, if not immediately then during updates, do not confuse multilib with testing.

2 Install required packages with pacman

sudo pacman -S git base-devel dkms linux-headers

3 Install yay to handle AUR packages (alternatives exist)

git clone https://aur.archlinux.org/yay.git

Note this assumes the working directory is /home/user, the above command downloads to wherever you are cd into

cd yay
makepkg -si

After it finishes

cd /home/user

Note user is your account name, alternative cd a single space then tilde "cd \~" without the " ".

4 Use yay to install AUR packages

yay -S nvidia-580xx-dkms nvidia-580xx-utils nvidia-580xx-settings

Optional

yay -S opencl-nvidia-580xx lib32-nvidia-580xx-utils lib32-opencl-nvidia-580xx libxnvctrl-580xx

5 Edit /etc/mkinitcpio.conf

sudo nano /etc/mkinitcpio.conf

Add the following in the Modules section, follow text formatting and spacing, do not delete or add anything else.

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

Ctrl and X, y, Enter

sudo mkinitcpio -P

Although the yay installation process should have already regenerated, it can sometimes fail and it's a good idea to check with manual command above.

If using GRUB after regenerating initramfs, otherwise modify for other bootloader or EFI stub or UKI to either update or regenerate

sudo grub-mkconfig -o /boot/grub/grub.cfg

Note it assumes grub.cfg is inside /boot and not /boot/efi/grub/grub.cfg, if so modify command.

Other considerations, hybrid graphics, meaning IF the system has an IGP, it might default to it, disable it inside UEFI for desktops. As for laptops, do not disable IGP as it is required for longer battery life and find instead a software solution to switch between them, follow wiki.

These were reconstructed with vague memory of the process and AI, anyone feel free to adjust or correct the steps, hardware configurations and settings could require additional intermediate commands, example using Secure Boot requires proprietary nvidia drivers to be signed, might also need to blacklist nouveau in the kernel default command line parameters.

____________

Part B - Documentation/tool request

Whomever thinks they are able to and so inclined, the community could use script/GUI tool to automate (example as provided by Linux Mint, select driver, click apply changes when it finishes, requests restart) the above process for 2 scenarios, Secure boot on and off and updating the Arch wiki with a page detailing the above process, expanded for more scenarios for PCs and laptops with hybrid graphics AMD IGP and nvidia dedicated, Intel IGP and nvidia dedicated legacy card.

Alternatively if it is a better way of downloading the driver and above dependencies or related packages from an official source, either nvidia or well known and approved maintainer, that could also work, though idk how automation would work when updating the system.


r/archlinux • • 11h ago

QUESTION Installing EAC supported signed kernels

0 Upvotes

is there a simple way to install the ubuntu or fedora signed kernels as an arch package for EAC support (hopefully in addition to the normal arch kernel when I want to use it)?


r/archlinux • • 18h ago

SUPPORT Why do I get notified that Spotify has crashed whenever it switches songs?

0 Upvotes

After every few song switches, I receive a notification telling me that some service related to Spotify (spotify-launcher) has crashed:

/home/jake/.local/share/spotify-launcher/install/usr/share/spotify/spotify has encountered a fatal error and was closed.

I get no other indication that anything related to Spotify has crashed. The program itself continues working as normal (as far as I can tell). This does not happen with the Flatpak version of Spotify.

Log


r/archlinux • • 1d ago

SUPPORT | SOLVED Kde 6.8.1 animations lag and low fps solved

39 Upvotes

Hi Just a info that can help some people, I'm having an issue with lag in system animations and in game​​​ after the last kde update, Always at night, but what's very strange​​​​​​​

So the trigger is the time? Yes, exactly. I left the automatic night light active and whenever it activated it ended the performance of everything, deactivating solved the problem.

I hope this can help someone​


r/archlinux • • 1d ago

QUESTION Qtile vs AwesomeWM on X11 for NVIDIA (RTX 3050): Which is the better daily driver in 2026?

0 Upvotes

Hey everyone. I'm currently trying to settle on a tiling window manager for my Arch setup.

Here's my situation:

- GPU: RTX 3050, CPU: i3-12100F, Monitor: 2560x1440 @ 165Hz.

- I spent a lot of time on Wayland (Hyprland, Niri), but I constantly suffer from micro-stutters and frame-pacing issues in games (Dota 2) due to NVIDIA drivers.

- I tried i3, it's rock solid for games, but the default look and feel isn't for me. I want something more "advanced" with a better out-of-the-box aesthetic and widget ecosystem.

I've narrowed it down to two options on X11:

  1. **Qtile:** Love the idea of configuring everything in Python.

  2. **AwesomeWM:** Seems to have a much more powerful widget system and better default layouts.

For those who daily drive either of these (especially with NVIDIA), which one would you recommend for:

- Stability and input latency during gaming (with Picom or without).

- Ease of building a modern, good-looking bar (vs using something like Polybar).

- Overall maintainability of the config.

Thanks in advance for any insights!


r/archlinux • • 1d ago

SHARE Alt+right click = search current selected text with default browser

2 Upvotes

Latest KDE Plasma using Wayland

Using xremap I made alt+right click run a script

https://github.com/xremap/xremap

From memory, these are the dependencies besides xremap

  • jq
  • wl-clipboard (wl-paste)
  • xdg-utils (xdg-open, xdg-mime, xdg-settings)
  • kdotool

Make the file in the place below and give it the following code
~/.config/xremap/config.yml

replace `USER` with your username

keymap:

- name: Search selection on Alt+RightClick

exact_match: true

remap:

Alt-BTN_RIGHT:

launch: ["/home/USER/.local/bin/search-selection.sh"]

The following code is placed in the .sh file linked above - this is a bit longer than it needed to be, but it is done this way so anyone should be able to just copy paste and get it running.

#!/bin/bash

SEARCH_URL="https://www.google.com/search?q="

# Uncomment to log everything to a file for debugging:

# exec >>/tmp/gsearch.log 2>&1; set -x

# Work out which user owns the graphical session

if [ "$(id -u)" -ne 0 ]; then

U=$(id -un)

else

U=$(loginctl list-sessions --no-legend | while read -r sid _; do

if [ "$(loginctl show-session "$sid" -p Active --value)" = yes ] &&

[ "$(loginctl show-session "$sid" -p Type --value)" = wayland ]; then

loginctl show-session "$sid" -p Name --value

break

fi

done)

fi

[ -n "$U" ] || { echo "no active wayland user found" >&2; exit 1; }

RT=/run/user/$(id -u "$U")

USER_HOME=$(getent passwd "$U" | cut -d: -f6)

SOCK=$(find "$RT" -maxdepth 1 -name 'wayland-*' ! -name '*.lock' | head -1)

[ -n "$SOCK" ] || { echo "no wayland socket in $RT" >&2; exit 1; }

ENVV=(XDG_RUNTIME_DIR="$RT"

WAYLAND_DISPLAY="$(basename "$SOCK")"

DBUS_SESSION_BUS_ADDRESS="unix:path=$RT/bus"

HOME="$USER_HOME")

run() {

if [ "$(id -u)" -eq 0 ]; then

sudo -u "$U" env "${ENVV[@]}" "$@"

else

env "${ENVV[@]}" "$@"

fi

}

SEL=$(run wl-paste --primary --no-newline 2>/dev/null | tr -d '\n')

[ ${#SEL} -lt 1 ] && exit 0

QUERY=$(printf %s "$SEL" | tr -d '\n' | jq -sRr u/uri)

# Find the default browser's .desktop file and its window class

DESK=$(run xdg-mime query default x-scheme-handler/https)

[ -n "$DESK" ] || DESK=$(run xdg-settings get default-web-browser)

DF=

for d in "$USER_HOME/.local/share/applications" \

/usr/local/share/applications /usr/share/applications \

/var/lib/flatpak/exports/share/applications \

"$USER_HOME/.local/share/flatpak/exports/share/applications"; do

[ -f "$d/$DESK" ] && { DF="$d/$DESK"; break; }

done

CLASS=

[ -n "$DF" ] && CLASS=$(grep -m1 '^StartupWMClass=' "$DF" | cut -d= -f2)

[ -n "$CLASS" ] || CLASS=${DESK%.desktop}

# Open in the default browser

run xdg-open "${SEARCH_URL}${QUERY}"

# Raise the browser window (wait up to ~2s in case it had to start up)

KDOTOOL=$(command -v kdotool || echo /usr/local/bin/kdotool)

for _ in $(seq 20); do

WINID=$(run "$KDOTOOL" search --class "$CLASS" | head -1)

[ -n "$WINID" ] && break

sleep 0.1

done

[ -n "$WINID" ] && run "$KDOTOOL" windowactivate "$WINID"

Start xremap on boot
1. Find the xremap path:
which xremap

  1. Create `/etc/systemd/system/xremap.service` (replace `USER` and `XREMAP_PATH` with your username and the path from step 1):
    ini
    [Unit]
    Description=xremap
    After=graphical.target

[Service]
ExecStart=XREMAP_PATH --mouse --allow-launch true /home/USER/.config/xremap/config.yml
Restart=on-failure

[Install]
WantedBy=graphical.target

  1. Enable it:
    sudo systemctl enable --now xremap

TADA!!!


r/archlinux • • 1d ago

SUPPORT Issues with game performance? (AMD)

0 Upvotes

Wondering if anyone else has experienced this recently. After running a system upgrade the other day, my games all run atrociously. I'm using a 9070xt and 9850X3D and was getting sub 30fps on all games. Tried clearing shader caches, checked power profiles, etc, couldn't figure out a solution. Thankfully rolling back to earlier versions of mesa and vulkan solved the issue for now, but obviously I'll have to upgrade eventually. Is there any kind of known bug with recent updates on AMD cards?


r/archlinux • • 21h ago

QUESTION Arch for school

0 Upvotes

Ive just installed arch on my laptop for school and i was wondering what programm i should use to do my school work i mostly just need to write stuff down on pdfs and do coding


r/archlinux • • 1d ago

SUPPORT Arco y Apparmor

Thumbnail
0 Upvotes

r/archlinux • • 1d ago

SUPPORT Help me I have tried everthing now

0 Upvotes

Issue Description

Hardware: HP Laptop (Subsystem ID: 8c78), Intel Core (Raptor Lake) iGPU + NVIDIA GeForce RTX 4060 Max-Q (Hybrid Graphics).

OS: Arch Linux (KDE Plasma).

Problem: The KDE brightness slider moves, but the physical screen brightness does not change.

Diagnostics:

ls /sys/class/backlight/ shows only one device: nvidia_wmi_ec_backlight.

brightnessctl -d nvidia_wmi_ec_backlight set 50% successfully writes to the sysfs interface but ignores the command physically.

No other backlight interfaces (like intel_backlight or acpi_video0) are exposed by the system.

🛠️ Solutions & Troubleshooting Attempted (All Failed)

Verified Hardware: Used brightnessctl to directly write to the nvidia_wmi_ec_backlight device. (Slider moves, physical screen does not).

Restarted KDE Daemon: Ran systemctl --user restart plasma-powerdevil to rule out KDE glitches.

User Permissions: Added the user to the video group (sudo usermod -aG video $USER) and rebooted. (No effect).

Kernel Parameter (Native): Added acpi_backlight=native to GRUB. (No effect, still only 1 device).

Kernel Parameter (WMI): Added acpi_backlight=nvidia_wmi_ec to GRUB. (No effect).

Forced Coexistence: Added acpi_backlight=native nvidia_wmi_ec_backlight.force=1 to GRUB. (Still only 1 device).

Checked Blacklists: Verified /etc/modprobe.d/ for blacklists and manually ran sudo modprobe nvidia_wmi_ec_backlight. (Module loads fine, but hardware ignores it).

Kernel Parameter (Vendor): (Currently attempting/planned) acpi_backlight=vendor.

Please help me im M17 know no so much about computers


r/archlinux • • 2d ago

SUPPORT Cyberpunk 2077 v2.5 can't launch on Steam

13 Upvotes

Bought Cyberpunk on Steam yesterday, but can't seem to launch.

My specs:
CPU: Ryzen 5 5600
GPU: Geforce RTX 2080 ti
Nvidia Driver: 615.78.08

Errors in Proton log:
"err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebth": c0000142"
"err:nvml:DllMain __wine_init_unix_call failed, status c0000135"
"err:vulkan:vkCreateComputePipelines Exception 0xc000001d in Unix call."
"err:service:device_notify_proc failed to get event, error 1726"

(Also regarding winebth: i don't have bluetooth on my pc)

I've tried all available default proton versions on steam, and GE Proton 11-11 and 9-22
Also I am adding a --launcher-skip flag so it shouldn't be that. Also I've rechecked my nvidia packages (lib32-nvidia-utils, vulkan-icd-loader, lib32-vulkan-icd-loader, vulkan-tools) and downloaded the latest versions from pacman.

I wasted half of yesterday trying to make it launch. Is it because the version is too new? Should I wait for the next Proton patch?

Edit:
Also forgot to mention that I'm using Wayland Gnome desktop


r/archlinux • • 2d ago

QUESTION FDE – How to protect against shoulder surfing and cold boot attacks?

0 Upvotes

I'm planning to install Arch with full disk encryption. I have read about all the ways to use SecureBoot, TPM, etc. to protect against many kinds of attacks, but there are two things that still worry me:

  1. Cold-boot attacks: if my laptop gets stolen while powered on, the thief can extract the encryption key from the RAM. I can try to avoid leaving it on when traveling, but there are still situation when this can happen.
  2. Shoulder surfing or other password stealing methods: if someone sees me entering my encryption password they can then easily decrypt my disk even if can only steal it while powered off. Even if I use TPM with PIN they can first power it on and enter the PIN and then use cold-boot attacks to get the encryption key.

Are there ways to protect myself against those kinds of attacks (that don't require buying expensive special hardware)?

(I know I'm probably way too paranoid for someone with no special secrets, but I'd like to know my device is as protected as reasonably possible.)


r/archlinux • • 2d ago

SUPPORT Stuck in emergency mode (Kernel 7.3)

7 Upvotes

Machine can't detect my /boot partition. But when I did diagnosis, it could show the boot partition and detect it. From my bootloader ( limine), I switched to Lts kernel and it let me in to my system. The problem is with Kernel 7.3
What can solve this issue?


r/archlinux • • 1d ago

SUPPORT issue installing arch

Thumbnail
0 Upvotes

i originally posted this in r/DistroHopping but there wasnt many people there and i feel like its more appropriate here anyway.


r/archlinux • • 1d ago

SHARE Introducing pkgds: tool to inspect actual space used by packages

0 Upvotes

Hey,

a while back I was heavily bothered by the size of ROCm and associated packages and decided to trim those (with NoExtract in pacman.conf) but I didn't know of an easy way to easily see how much I was saving every time. (Sure I could have written a bash script to do it, but I thought rust might be more interesting...), so I wrote pkgds (ds because its speed is inspired by the amazing dirstat_rs, best du alternative if you don't know).

Pacman and associated only tell you the size the metadata says the package uses, not the actual used space on disk.

Ex:

$ pkgds -H Gi rocm-llvm miopen-hip rocblas

PACKAGE REAL %

rocm-llvm 6.9 GiB 78.1%

miopen-hip 1.5 GiB 16.6%

rocblas 0.5 GiB 5.3%

$ expac -H G '%n %m' rocm-llvm miopen-hip rocblas # declared size

rocm-llvm 6.86 GiB

miopen-hip 2.28 GiB

rocblas 1.29 GiB

Alas to query the real space used in a compress btrfs partition you need root, just like with compsize, so as always the disclaimer `don't run random programs from the internet especially as root`. Also, querying the compressed size of packages is quite slower than the regular size query, so pick your poison of size vs accuracy...

link: https://github.com/John-Gee/pkgds

I hope it helps somebody else!