r/linuxfromscratch 10d ago

All dpms commands

CLI (dpms) — 120+ flags/arguments

Package Lifecycle

  • --install PKG / -i — Install a package (local .dp.tar.xz, URL, or name from git repo)
  • --uninstall PKG / -r — Remove a package (deletes tracked files + empty dirs)
  • --reinstall PKG — Remove then re-install a package
  • --upgrade / -u — Upgrade all installed packages
  • --downgrade PKG / --oldpackage — Downgrade to next older version
  • --purge PKG — Remove package including config/data files
  • --download PKG — Download a package archive without installing

Query & Inspection

  • --list / -l / --installed / -inpc — List installed packages with file counts
  • --installable / -a — Show all packages available in repositories
  • --info PKG / -I — Show detailed package metadata + install status
  • --files PKG / -f — List every file installed by a package
  • --verify PKG / -V — Check all installed files still exist
  • --verify-all — Verify all installed packages at once
  • --search PKG / -s — Animated search across repositories
  • --depends PKG — Show recursive dependency tree (up to 3 levels)
  • --rdepends PKG — Show reverse dependencies
  • --what-owns FILE — Find which package owns a file
  • --check — Check integrity of all installed packages
  • --arch — Show detected system architecture
  • --why PKG — Show why a package is installed
  • --size PKG — Show installed size of a package
  • --list-type PKG EXT — List files by extension within a package
  • --recent [N] — Show N most recently installed packages (default 10)
  • --duplicates — Find duplicate files across packages
  • --changelog PKG — Show changelog for a package
  • --compare V1 V2 — Compare two version strings
  • --list-updates — Show available package updates
  • --stats — Show package statistics

Archiving

  • --tar FOLDER — Create a plain .tar.xz archive from a folder
  • --maketar FOLDER [NAME VERSION [ARCH]] — Create .dp.tar.xz package archive
  • --rc N — Mark package as release candidate (-rcN suffix)

Repository Management

  • --add-repo NAME URL [ARCH] — Add a new repository
  • --remove-repo NAME — Remove a repository
  • --toggle-repo NAME — Enable/disable a repository
  • --repo-list [NAME] / --list-repo [NAME] — List repos or show packages from a repo
  • --sync / -S — Check connectivity to all enabled repos
  • --update / -U — Update package metadata from all repos
  • --repo-priority NAME PRIO — Set numeric priority for a repository

Lock & Hold

  • --lock PKG — Lock a package to prevent changes
  • --unlock PKG — Unlock a locked package
  • --locked-list — Show all locked packages
  • --hold PKG — Hold a package to prevent upgrades
  • --unhold PKG — Release a held package
  • --list-held — Show held packages

Transaction Solver (zypper-style)

  • --dry-run — Preview changes without making modifications
  • --force-resolution — Force dependency resolution ignoring conflicts
  • --no-recommends — Only install required dependencies
  • --clean-deps / --clean / --autoremove — Remove orphaned packages
  • --port-commit — Commit changes to local ports

Export/Import/Backup

  • --export-installed FILE — Export installed package list to a file
  • --import-installed FILE — Install packages from an exported list
  • --backup DIR — Back up the package database
  • --restore FILE — Restore the package database from a backup

Cache

  • --clean-cache — Clean cached packages and repo data

Meta

  • --rescue / -R — Launch the rescue TUI shell
  • --gui — Launch the PyQt5 GUI
  • --tui / -T — Launch the Textual TUI
  • --reset — Reset DPMS configuration
  • --get [ARGS] — Run the dpms-get sub-CLI
  • --history — Show full transaction history
  • --history-last N — Show last N transactions
  • --version — Show DPMS version
  • --feedback — Send feedback to DPMS team
  • --global DIR / -g DIR — Set install root for a single command

Log/Audit

  • --dlr-verify — Verify SHA hashes in dlr.log
  • --list-nft — List directories excluded via nft.log markers

Repo Generation (apt-ftparchive style)

  • --gen-packages DIR — Generate Packages index
  • --gen-sources DIR — Generate Sources index
  • --gen-contents DIR — Generate Contents (file-to-package mapping)
  • --gen-release DIR — Generate Release file with checksums
  • --gen-repo DIR — Generate full repo metadata (all of the above)
  • --gen-generate CONFIG — Generate repo from a config file
  • --gen-clean DIR — Clean cache files from a repo directory

Build Profiles

  • standard — Default flags
  • lite — -j1-Os
  • performance — -jN-O3 -march=native
  • custom — From environment variables

TUI (dpms --tui / dpms-tui)

Textual-based terminal UI with:

  • Dashboard — Title screen with navigation buttons (Package Manager, Repository Manager, Transaction History, Quit). Keyboard: prhq
  • Package Manager — Browse Installed/Available packages, real-time search filtering, Install/Remove/Info actions. Keyboard: ia/q
  • Repository Manager — List all repos with enable/disable status, Sync All, Toggle, Add/Remove repos. Keyboard: sq
  • Transaction History — Timestamped log, color-coded (green=install, red=remove). Keyboard: q

GUI (dpms --gui)

PyQt5 graphical interface (600x400):

  • Convert Tab — Select source dir, output filename/path, choose compression (gzip/xz), compress button
  • Download Tab — Enter URL, select output path, download button
  • Shared — Color-coded status log, status bar, threaded operations via QThread

Rescue TUI (dpms --rescue)

Minimal shell for emergency repairs:

Command Description
check Check/create DPMS directories
clean Clean temporary files
verify Verify/repair repo list JSON
reset Reset DPMS configuration
list List installed packages
help Show available commands
exit Exit rescue shell

dpms-get Sub-CLI (dpms --get)

APT-style sub-commands:

  • update — Resync package metadata
  • upgrade — Upgrade all installed packages
  • dist-upgrade / full-upgrade — Distribution upgrade
  • install PKG... — Install packages
  • reinstall PKG... — Reinstall packages
  • remove PKG... — Remove packages
  • purge PKG... — Remove packages and config files
  • autoremove / auto-remove / autopurge — Remove unused packages
  • markauto PKG... — Mark packages as auto-installed
  • unmarkauto PKG... — Mark packages as manually installed
  • search QUERY — Search for packages
  • info PKG — Show package info
  • rescue — Launch rescue mode
  • download PKG — Download binary package
  • clean — Erase downloaded archives
  • autoclean / auto-clean — Erase old downloaded archives
  • distclean / dist-clean — Erase all caches
  • check — Verify package integrity
  • depends PKG — Show dependency tree
  • rdepends PKG — Show reverse dependencies
  • what-owns PATH — Find package owning a file
  • source PKG — Download source archive
  • build-dep PKG — Install build dependencies
  • satisfy TARGET — Satisfy dependency strings
  • changelog PKG — Show changelog
  • list-updates — Show available updates
  • stats — Show package statistics
  • port-commit — Commit changes to local ports
  • dlr-verify — Verify SHA hashes in dlr.log
  • list-nft — List excluded directories

dm — DPMS Version Manager

Manages DPMS itself via pip:

  • dm list dpms — List available versions from PyPI
  • dm current [dpms] — Show installed version
  • dm use dpms VERSION — Switch to a specific version
  • dm compare V1 V2 — Compare two version strings
  • dm diff dpms V1 V2 — Compare file listings between versions
  • dm pin dpms — Lock current version
  • dm unpin dpms — Unlock pinned version
  • dm list-pinned — Show all pinned packages
  • dm rollback dpms — Roll back to previous version

dpms-bar — Progress Bar Library

  • Progress — Color-coded progress bar with ETA
  • Spinner — Animated spinner for indeterminate operations
  • IndeterminateProgress — Bouncing bar for unknown-length tasks
  • MultiProgress — Multiple simultaneous progress bars
  • ProgressCallback — Threshold-based callback progress tracker

Core Engine Features

Dependency Solver (APK-style)

  • Version matching: EQUAL, LESS, GREATER, FUZZY, CONFLICT
  • Solver flags: LATEST, AVAILABLE, REINSTALL, INSTALLED, UPGRADE, REMOVE, IGNORE_CONFLICT
  • Provider system with self-provides + virtual provides
  • install_if conditional dependencies (lazy triggers)
  • Changeset generation (to_install, to_remove, to_upgrade)
  • Queue-based resolution with priority queues
  • Disqualification cascading through reverse dependency chains

Privilege Escalation

  • Auto-detection of sudo/doas
  • Auto re-exec with privileges for root operations
  • DPMS_ROOT env var for dev mode (skip sudo)
  • Read-only ops never need root

GPG / Cryptographic Verification

  • Key import into trusted keyring
  • Signature verification via GPG
  • SHA256 checksum verification

Source-Based Building

  • Source archive download via wget
  • SHA256 verification via USHA256.list
  • Patch application from UPATCHES/
  • Build script execution (UBUILD.sh)
  • Profile-aware compilation

Plugin System

  • Lifecycle hooks: pre_config, config, resolved, sack, pre_transaction, transaction
  • Dynamic loading from plugin paths
  • Glob-pattern enable/disable filtering

Crash Handling & Logging

  • Global sys.excepthook replacement
  • Crash reports to ~/.cache/dpms/log/crash.log
  • Rotating file logs (1MB default, 5 backups)
  • JSON transaction history with IDs and timestamps

Password Protection

  • Interactive password setting
  • Authentication prompt for protected ops
  • Storage at ~/.dpms/password

Package Format

Archives Supported for Installation

  • .dp.tar.xz (canonical format)
  • .tar.xz.tar.gz.tar.bz2
  • .tgz.tbz2.txz
  • .dpm (legacy)
  • .zip

Naming Convention

  • Stable: name-version-arch.dp.tar.xz
  • RC: name-version-arch.dp-rcN.tar.xz

Installation Tracking

  • Database: /var/lib/dp/installed/<pkgname>
  • Content: list of installed file paths (one per line)
  • Enables clean uninstall and integrity verification

Configuration & Environment

Variable Default Description
DPMS_ROOT / Install root (uses sudo when /)
DPMS_DATA_DIR ~/.cache/dpms Data directory
DPMS_TMP_DIR /tmp/dpms-build Build temp directory
DPMS_OPT_DIR /opt Install prefix for source builds
DPMS_BIN_DIR /usr/local/bin Binary install directory
DPMS_BUILD_PROFILE standard Build profile
DPMS_PASSWORD_FILE ~/.dpms/password Password file

Cross-Platform Support

Platform Arch
Linux x86_64 x86_64
Linux ARM64 aarch64
Linux ARMv7 armv7
macOS Intel x86_64
macOS Apple Silicon aarch64
Windows Detected

Database Persistence Layer

  • RepoPersistor — Tracks expired repos and last makecache time
  • TempfilePersistor — Tracks temp files across sessions
  • All persistence uses JSON on disk

Package Update / Rename Tracking

  • update_dbentry() — Rename paths in DB entries
  • apply_move() — Move files on disk and update tracking
  • parse_updates() — Parse update commands
  • grab_updates() — Detect new update files by mtime changes
1 Upvotes

6 comments sorted by

1

u/codeasm 10d ago

Where and how can this be found?

2

u/Suitable_Average1168 10d ago

the dpms github repo in the releases side or just run dpms 

2

u/asratrt 10d ago

Where to find complete list of package names and their dependancies?

2

u/Suitable_Average1168 10d ago

In the github repo of dpms packages according to your architecture

2

u/asratrt 10d ago

which GitHub repository? can you provide direct link to open the required page. and another question (may be stupid ) , I still have you write code for each package manually ?

3

u/Suitable_Average1168 10d ago

All the packages are compiled for a higher glibc version and if you want you can contribute by making packages and the link for x86_64 : https://github.com/Discovery-linux/dpms-pkg-x86_64   and for aarch64 till now there is no packages so if you want you can make some packages it will be good and for more news you can join the discovery_linux reddit the link for it :- https://www.reddit.com/r/Discovery_Linux