LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pacman-d

short form of pacman --database, which operates on the package database

TLDR

Mark a package as installed as a dependency
$ sudo pacman -D --asdeps [package]
copy
Mark a package as explicitly installed
$ sudo pacman -D --asexplicit [package]
copy
Check the local database for consistency
$ pacman -Dk
copy
Check local and sync databases for consistency
$ pacman -Dkk
copy
Check in quiet mode
$ pacman -Dkq
copy

SYNOPSIS

pacman -D [options] package(s)

DESCRIPTION

pacman -D is the short form of pacman --database, which operates on the package database. It allows modifying package attributes stored in the local database without reinstalling packages.The most common use is changing a package's install reason between dependency and explicit. Packages marked as dependencies may be removed by `pacman -Rs` when no other packages depend on them, while explicitly installed packages are kept.

PARAMETERS

--asdeps

Mark packages as installed as dependencies. Affects orphan detection.
--asexplicit
Mark packages as explicitly installed. Prevents removal when cleaning orphans.
-k, --check
Check the local package database for internal consistency. Use twice (`-kk`) to also check sync databases.
-q, --quiet
Suppress messages on successful completion; only show errors.

CAVEATS

Marking packages incorrectly can affect orphan detection with `pacman -Qdtq`. Packages marked `--asdeps` may be removed when running `pacman -Rs`.

SEE ALSO

Copied to clipboard
Kai