-
Install Requirements
Make sure you have Python 3 available and the required package manager (Arch, Ubuntu, Fedora, RHEL, SUSE, Alpine). -
Prepare Your Package List
Create aconfig.conffile (or any text file) with a list of packages you want installed, one per line.
Example:vim git curlYou can split your package lists into multiple files and include them:
# config.conf @include devtools.conf htop# devtools.conf gcc gdb -
Run declpm
python3 declpm.py config.conf
- The script detects your system's package manager and installs/removes packages to match your config.
- Supported managers:
pacman(Arch),apt-get(Ubuntu),dnf(Fedora),yum(RHEL),zypper(SUSE),apk(Alpine).
-
State Tracking
- declpm keeps track of installed packages in your
$XDG_STATE_HOME/package-monfile. - On each run, it will remove packages not present in your config, keeping your system declarative!
- declpm keeps track of installed packages in your
declpm is a simple, declarative tool for managing packages across major Linux distributions.
Just list your desired packages, run the tool, and declpm will sync your system—installing missing packages and removing any not in your list!
- Cross-distro: Works with popular Linux package managers.
- Declarative: Your system matches your package list—no more drift!
- Simple: One file, one command, done.
python3 declpm.py <your-list.conf><your-list.conf>: A plain text file listing packages to be present on your system.
python3 declpm.py config.conf- Installs missing packages, removes extras
- Supports @include for modular configs
- Cross-distro support
- Tracks state for accurate removals
MIT License – see LICENSE for details.