Skip to content

Use /opt for Debian package app files (also RPM and Pacman)#327

Open
yamixst wants to merge 1 commit intofastforgedev:devfrom
yamixst:dev
Open

Use /opt for Debian package app files (also RPM and Pacman)#327
yamixst wants to merge 1 commit intofastforgedev:devfrom
yamixst:dev

Conversation

@yamixst
Copy link
Copy Markdown

@yamixst yamixst commented Mar 16, 2026

This PR changes the default installation directory for .deb packages from /usr/share/{binary_name} to /opt/{binary_name}.

Motivation

According to the Filesystem Hierarchy Standard (FHS), /usr/share is intended for architecture-independent, read-only data — things like documentation, icons, locale files, and .desktop entries. It is not meant to hold application binaries or their runtime dependencies.

/opt, on the other hand, is specifically designated for self-contained, add-on application software packages. Each application gets its own subtree (/opt/{package}), where it can place binaries, libraries, and any other files it needs — without mixing them into the shared system directories.

Why this matters

/usr/share/{name} /opt/{name}
FHS purpose Static, arch-independent data Self-contained third-party apps
Placing binaries here Violates FHS Correct per FHS
Isolation Files mix with system packages Clean per-app directory
Uninstall cleanliness Scattered files harder to track Single directory to remove
Lintian / rpmlint May produce warnings No warnings

Packaging tools like lintian flag binaries placed under /usr/share as a policy violation. Moving to /opt resolves this and aligns with how other third-party .deb distributors (Chrome, VS Code, Discord, Zoom, etc.) package their applications.

@yamixst yamixst changed the title Use /opt for Debian package app files Use /opt for Debian package app files (also RPM and Pacman) Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant