LinuxCommandLibrary

aptdcon

Interact with PackageKit using D-Bus

SYNOPSIS

aptdcon [options] [command] [args]

PARAMETERS

--help
    Show help message and exit

--version
    Show version information

--non-interactive
    Run without user interaction

--non-gui
    Do not show GUI dialogs

--hide
    Hide transaction progress

help
    Print help for aptdcon or specific command

list
    List packages by section/filter

search
    term: Search packages by name/description

show
    package: Show package details

info
    package: Get verbose package info

install
    package...: Install packages

remove
    package...: Remove packages

purge
    package...: Purge packages

upgrade
    [package]: Upgrade packages

dist-upgrade
    Full distribution upgrade

refresh-cache
    Refresh package cache

update-cache
    Update package lists

clean
    Clean downloaded .deb files

autoclean
    Remove obsolete .deb files

autoremove
    Remove auto-installed dependencies

simulate
    tid: Simulate transaction

commit
    tid: Commit transaction

cancel
    tid: Cancel transaction

DESCRIPTION

aptdcon is the command-line interface to Aptdaemon, a DBus system that allows packagekit frontends and other applications to perform package management tasks without blocking the UI. It enables non-interactive control over APT operations like installing, removing, upgrading packages, and managing caches in desktop environments such as GNOME Software Center.

Primarily used in Ubuntu and derivatives, aptdcon starts transactions via the aptdaemon service, which handles privilege escalation securely. It supports interactive mode for step-by-step confirmation or non-interactive mode for scripting. Transactions can be simulated, canceled, or committed, providing feedback on dependencies, disk space, and conflicts.

Key use cases include automation in scripts, querying package info, and integrating with graphical tools. It abstracts complex apt operations into simple commands, but relies on the aptdaemon service running. Output includes progress via DBus signals, making it suitable for frontends.

CAVEATS

Requires running aptdaemon service; not for server use; interactive by default; may prompt for sudo/password in some setups.

TRANSACTION ID USAGE

Commands like install return a Transaction ID (TID) for later simulate/commit/cancel:
tid=$(aptdcon install foo); aptdcon commit $tid

EXIT CODES

0: Success; 1: Error; 2: Transaction failed; 3: Canceled by user.

HISTORY

Introduced with Aptdaemon 0.3 in 2008 for Ubuntu Hardy Heron to enable PolicyKit-based package management in GNOME. Evolved for systemd-logind integration; largely superseded by apt in modern Ubuntu but still available in repositories.

SEE ALSO

apt(8), apt-get(8), aptitude(8), synaptic(8), aptdaemon(8)

Copied to clipboard