Arch Linux does not install .deb packages. pacman cannot read a Debian archive, and installing dpkg to unpack one program fights the rest of the system.
The supported way is the way every Arch package is built. Write a PKGBUILD that downloads the .deb, unpacks the files upstream already built, and hands that tree to pacman. For your own machine, makepkg -si is enough. If other people need the program, publish the recipe to the AUR. The AUR stores the recipe, not the binary.
A
.debis an archive with a control file and a filesystem image. APKGBUILDtellsmakepkgwhich archive to download and where those files land.
AUR packages are unofficial and not vetted. Users build them at their own risk, so the recipe you publish has to be readable and honest about what it installs.
The examples use a fictional package, example-app 1.4.2, shipped as example-app_1.4.2-1_amd64.deb. Replace the name, version, and URL.
1. See what is inside the .deb
A Debian binary package is an ar archive with three members:
debian-binary, a format markercontrol.tar.*, the metadata: name, version, dependencies, maintainer scriptsdata.tar.*, the files that would be copied onto the system
The tarballs use different compression depending on the builder: zstd (.zst) is common on Ubuntu, xz on Debian, and gz or an uncompressed tar appear in older or third-party packages. bsdtar, which ships with Arch, reads all of them.
Work in a scratch directory, not in the repo you will publish.
mkdir -p /tmp/deb-inspect && cd /tmp/deb-inspect
curl -fLO "https://example.com/releases/example-app_1.4.2-1_amd64.deb"
bsdtar -tf example-app_1.4.2-1_amd64.deb
bsdtar -xf example-app_1.4.2-1_amd64.deb
bsdtar -xf control.tar.*
cat control
bsdtar -tf data.tar.* | headcontrol is plain text. The fields that matter: Package, Version, Architecture, Depends, Recommends, Description. Read the license from the copyright file inside the data archive:
bsdtar -xOf data.tar.* --include='*copyright*' | lessArchitecture: amd64 maps to x86_64. Architecture: all maps to any. The AUR requires x86_64 support, so a package that ships only arm64 is not allowed there.
Two Debian things do not carry over:
- Maintainer scripts (
postinst,prerm, and the rest) are shell scripts written for Debian tooling. Do not run them. Read them, and reproduce only what is still needed (a symlink, a license file) insidepackage(). If real post-install logic remains, use a.installfile. - Debian package names are not Arch package names.
libgtk-3-0t64cannot go intodepends.
The t64 suffix comes from the 64-bit time_t transition in Debian and Ubuntu. Arch did not rename those libraries. Drop the suffix and the soname digit, then find the shared object.
2. Map the dependencies
A sample Depends line:
Depends: libc6 (>= 2.34), libgtk-3-0t64 (>= 3.24), libnotify4, libnss3, libasound2t64Version constraints belong to Debian. On Arch you depend on the package name and pacman supplies the current library.
Find which Arch package owns a library:
sudo pacman -Fy
pacman -F libgtk-3.so.0Common translations:
| Debian package | Arch package |
|---|---|
libc6 | glibc, already required by everything, leave it out |
libstdc++6, libgcc-s1 | gcc-libs |
zlib1g | zlib |
libglib2.0-0, libglib2.0-0t64 | glib2 |
libgtk-3-0, libgtk-3-0t64 | gtk3 |
libnotify4 | libnotify |
libnss3 | nss |
libnspr4 | nspr |
libasound2, libasound2t64 | alsa-lib |
libx11-6 | libx11 |
libxss1 | libxss |
libxtst6 | libxtst |
libdrm2 | libdrm |
libcups2 | libcups |
ca-certificates | ca-certificates |
Recommends and Suggests entries are optional on Debian. On Arch they become optdepends, written as 'package: reason'.
Libraries the .deb bundles under /opt or its own usr/lib are already in the archive and do not belong in depends. After the first build, namcap reports what is missing. A successful launch of the program outranks any guess.
3. Write the PKGBUILD
Install the tooling once:
sudo pacman -S --needed base-devel namcap pacman-contribnamcap lints recipes and built packages. pacman-contrib provides updpkgsums.
Name the directory after the package. Software that installs prebuilt deliverables takes the -bin suffix. The rule applies when upstream source is available. For proprietary software, also follow the Nonfree applications package guidelines on the ArchWiki.
mkdir example-app-bin && cd example-app-binPKGBUILD:
# Maintainer: Your Name <you at example dot com>
pkgname=example-app-bin
_pkgname=example-app
pkgver=1.4.2
_debrel=1
pkgrel=1
pkgdesc="Example desktop app, repackaged from the upstream .deb"
arch=('x86_64')
url="https://example.com"
license=('LicenseRef-proprietary')
depends=(
'gtk3'
'libnotify'
'nss'
'alsa-lib'
)
provides=("${_pkgname}=${pkgver}")
conflicts=("${_pkgname}")
options=('!strip' '!debug')
_deb="${_pkgname}_${pkgver}-${_debrel}_amd64.deb"
noextract=("${_deb}")
source_x86_64=("${_deb}::https://example.com/releases/${_deb}")
sha256sums_x86_64=('SKIP') # temporary, replaced by updpkgsums
package() {
cd "$srcdir"
# Unpack the .deb, then the filesystem image into the package root.
bsdtar -xf "${_deb}"
bsdtar -xf data.tar.* -C "$pkgdir"
# Debian maintainer scripts are not run. Install the license where Arch expects it.
if [[ -f "$pkgdir/usr/share/doc/${_pkgname}/copyright" ]]; then
install -Dm644 "$pkgdir/usr/share/doc/${_pkgname}/copyright" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
fi
# Remove Debian-only metadata. Leave real documentation alone.
rm -f "$pkgdir/usr/share/doc/${_pkgname}/changelog.Debian.gz"
find "$pkgdir" -type d -exec chmod 755 {} +
}Field notes:
- The first line follows the AUR format:
# Maintainer: Name <address at domain dot tld>. Obfuscate the address against spam. If you take over a package, add earlier maintainers as# Contributor:lines. pkgveris the upstream version._debrelis the Debian revision after the hyphen in the filename.pkgrelcounts recipe-only releases of the same upstream version.noextractstopsmakepkgfrom guessing how to unpack the.deb.package()unpacks it explicitly, so the result does not depend onmakepkgdetection.- The text before
::insource_x86_64is the filenamemakepkgsaves. sha256sums_x86_64must match the downloaded file. Do not publish a binary package withSKIP.licenseis the license of the upstream software, as an SPDX identifier (MIT,Apache-2.0,GPL-3.0-or-later). UseLicenseRef-proprietarywhen the copyright file is a vendor license, and install that file underusr/share/licenses.options=('!strip' '!debug')stopsmakepkgfrom rewriting binaries you did not compile. Stripping a prebuilt executable can break it.providesandconflictslet other packages depend onexample-appand block parallel installs.conflictsis evaluated only when installing the package. Do not usereplacesunless the package is a rename of another one (for example Ethereal to Wireshark). Afterpacman -Sy, any package carrying a matchingreplacesmakespacmanswap out the installed one on its own, which is too invasive for an alternate build.
Generate the checksum:
updpkgsumsElectron and Chromium-based programs ship a chrome-sandbox helper. On a standard Arch kernel with unprivileged user namespaces enabled, the app falls back to the namespace sandbox and does not need it. If it fails with a sandbox error (for example under linux-hardened), add this inside package(), after verifying the path exists:
chmod 4755 "$pkgdir/opt/${_pkgname}/chrome-sandbox"Desktop entries and icons are refreshed by pacman hooks. Do not call update-desktop-database or gtk-update-icon-cache in the recipe.
4. Build and install locally
Run makepkg as a normal user, never as root.
makepkg -si-s installs missing depends through pacman. -i installs the resulting package. Then lint:
namcap PKGBUILD
namcap example-app-bin-1.4.2-1-x86_64.pkg.tar.zstnamcap flags libraries that are linked but missing from depends, and dependencies nothing uses. Launch the program afterwards. A missing entry shows up as error while loading shared libraries. Add the Arch package that owns that .so, rebuild, reinstall.
When you are the only user, makepkg -si is the complete installation. The rest of this article covers sharing the package.
5. Check the AUR submission rules
Packages that break the rules can be deleted without warning. Verify these before creating the repository:
- Not in the official repositories. Search the official package database. If any version exists there, do not submit. If it is outdated, flag it out-of-date. If it is broken or lacks a feature, file a bug report. The only exception is a package with extra features or patches, which needs a different
pkgnameand aconflictsentry. - Not already in the AUR. Search the AUR. If it is maintained, send suggested changes as a comment. If it is unmaintained or the maintainer does not respond, adopt it. Do not create a duplicate.
- Useful to more than a few people. Extremely specialized packages do not belong there.
x86_64supported. Packages that do not support it are not allowed.- Correct suffix.
-binfor prebuilt deliverables,-gitand similar for VCS builds, no suffix for source builds of a fixed version. - No build artifacts. The AUR must not contain the
makepkgtarball or a filelist. Do not commit the.deb,src/,pkg/, or*.pkg.tar.zsteither. - Unsure? Ask for public review on the aur-general mailing list, the AUR forum, or the IRC channel before uploading.
6. Publish to the AUR
The AUR is a git host for PKGBUILD repositories. The repository name is the pkgbase, which equals pkgname for a single package: example-app-bin.
Account and SSH key
Register at aur.archlinux.org. Create a dedicated key pair rather than reusing an existing one, so you can revoke it without touching anything else:
ssh-keygen -t ed25519 -f ~/.ssh/aurPaste the public key into My Account. Several keys can be added, separated by newlines.
~/.ssh/config:
Host aur.archlinux.org
IdentityFile ~/.ssh/aur
User aurThe AUR host does not provide an interactive shell. Verify the key by cloning or pushing.
Create the repository
cd /tmp
git -c init.defaultBranch=master clone ssh://aur@aur.archlinux.org/example-app-bin.gitThe AUR accepts pushes only to master. The init.defaultBranch option makes the new repository use that name. If you already have a local repository on another branch, rename the branch before pushing.
For a new package name, git prints a warning that you cloned an empty repository. That is expected. If the name belonged to a deleted package, the repository is not empty. Its old history is still there, and you must build on top of it.
Copy in the tested PKGBUILD. Add the remaining files.
.gitignore excludes everything by default so build output cannot be committed by accident:
*
!.gitignore
!PKGBUILD
!.SRCINFO
!LICENSEIf the package needs a .install file or local patches, add them to the whitelist or force-add them with git add -f.
LICENSE licenses the recipe, not the .deb. Arch recommends 0BSD for package sources. It is not mandatory, but a package without a license, or under a different one, cannot be promoted to the official repositories. A REUSE.toml file is an accepted alternative way to declare licensing.
Copyright (c) 2026 Your Name
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.This is separate from the license array in the PKGBUILD, which describes the packaged software.
Generate .SRCINFO. The AUR reads versions, descriptions, and dependencies from it. If metadata changes and .SRCINFO does not, the website keeps showing old values.
makepkg --printsrcinfo > .SRCINFOCommits are authored with your global git identity, and rewriting pushed commits on the AUR is very hard. To use different credentials for this package only:
git config user.name "Your Name"
git config user.email "you@example.com"Commit and push:
git add PKGBUILD .SRCINFO LICENSE .gitignore
git commit -m "Initial import of example-app-bin 1.4.2-1"
git pushIf .SRCINFO is missing from your latest commit, the AUR rejects the push. Add it and run git commit --amend, then push again.
The package page appears at https://aur.archlinux.org/packages/example-app-bin. Others install it by building the repository:
git clone https://aur.archlinux.org/example-app-bin.git
cd example-app-bin
makepkg -siAUR helpers such as yay and paru automate that same clone-and-build sequence.
7. Ship an update
For a new upstream release, change pkgver (and _debrel if the Debian revision changed) and reset pkgrel to 1. When you change the recipe in a way that alters the built package and the upstream version stays the same, increment pkgrel. Do not bump either value for trivial edits such as a typo fix, because that forces every user to rebuild for nothing.
updpkgsums
makepkg -si
namcap example-app-bin-1.5.0-1-x86_64.pkg.tar.zst
makepkg --printsrcinfo > .SRCINFO
git add PKGBUILD .SRCINFO
git commit -m "Update to 1.5.0-1"
git pushBuild before pushing. A stale checksum breaks the package for everyone.
Automation can detect new releases, but it cannot replace reading the changelog. Upstream may change licenses, add or drop dependencies, or alter packaging even in minor versions. Automated updates are at your own risk, and accounts whose scripts misbehave can be removed without notice.
8. Maintain the package
- Read comments and apply useful suggestions.
- Do not post a comment with the version number after each update. The page already shows it, and the comment section should stay readable.
- Check upstream for new releases and improve the recipe over time. A published package is a commitment.
- To stop maintaining it, use Disown Package in the AUR web interface and optionally post to the aur-general mailing list. A package with no maintainers becomes orphaned.
Requests go through Submit Request under Package Actions. They notify the maintainer and the aur-requests mailing list, and Package Maintainers accept or reject them.
- Deletion: removes a
pkgbasefrom the AUR. A short reason with supporting details is required, such as the package being provided elsewhere or renamed. The explanation must be in the request, because the comments are not visible once a Package Maintainer acts. A deleted package's git repository stays cloneable. - Merge: deletes a
pkgbaseand moves its votes and comments to another one, which must be named in the request. Use it when upstream renames a project. It has nothing to do withgit merge. - Orphan: asks for a package to be disowned, usually after it has been flagged out-of-date for two weeks. It is granted after a two-week wait if the maintainer does not respond. Packages flagged for 180 days or more are orphaned automatically.
The .deb stays on the upstream server, pacman installs an ordinary package, and any Arch user can rebuild it from the PKGBUILD you pushed.