LinuxCommandLibrary

kpackagetool6

Install, remove, and manage KDE Plasma packages

TLDR

List all known package types that can be installed

$ kpackagetool6 --list-types
copy

Install the package from a directory
$ kpackagetool6 [[-t|--type]] [package_type] [[-i|--install]] [path/to/directory]
copy

Update installed package from a directory
$ kpackagetool6 [[-t|--type]] [package_type] [[-u|--upgrade]] [path/to/directory]
copy

List installed plasmoids (--global for all users)
$ kpackagetool6 [[-t|--type]] Plasma/Applet [[-l|--list]] [[-g|--global]]
copy

Remove a plasmoid by name
$ kpackagetool6 [[-t|--type]] Plasma/Applet [[-r|--remove]] "[name]"
copy

SYNOPSIS

kpackagetool6 [global-options] command [command-options]

PARAMETERS

--type <type>
    Restrict to package type, e.g. plasma/applet, plasma/runner, plasma/wallpaper, KWin/Script

--category <category>
    Filter by category within type

--user
    Install/list to user directory (~/.local/share/plasma/)

--global
    Install/list from system directory (/usr/share/plasma/, needs root)

--packageroot <path>
    Custom root directory for packages

--list
    List all installed packages (JSON with --format json)

--list-available
    List installable packages from packageroot

--install <path>
    Install package from zip/dir path

--uninstall <id>
    Remove package by full ID (e.g. org.kde.plasma.clock)

--print-installed <id>
    Show install path of package ID

--format <format>
    Output format: plain (default), json

--help
    Show usage help

--version
    Print version info

DESCRIPTION

kpackagetool6 is the command-line tool for managing kpackage structures in KDE Plasma 6. It handles installation, removal, listing, and querying of packages like plasmoids (widgets), runners, wallpaper plugins, KCM modules, and layout templates.

Packages are zip archives or directories with metadata.desktop and contents subdir. The tool supports user-local (~/.local/share/plasma/) or system-wide (/usr/share/plasma/) installs, validates metadata, and integrates with Plasma's discovery system.

Ideal for scripting customizations, bulk ops, or headless management. Requires Plasma 6 libs; run as root for global changes. Outputs JSON with --format json for parsing.

CAVEATS

Global ops need root; invalid packages skipped with warnings. No auto-restart of Plasma; restart panels manually. Limited to registered kpackagestructure types.

EXAMPLES

kpackagetool6 --type plasma/applet --install ~/Downloads/clock.zip
kpackagetool6 --global --type plasma/wallpaper --list
kpackagetool6 --type KWin/Script --uninstall org.kde.kwin.scripting.example

PACKAGE TYPES

Common: plasma/applet, plasma/runner, plasma/dataengine, plasma/shell, plasma/wallpaper, KWin/Decoration, KWin/Script

HISTORY

Successor to kpackagetool5 in Plasma 5. Rewritten for Plasma 6 (KF6) with JSON output, better error handling. Part of KDE Frameworks since ~2014.

SEE ALSO

kpackagetool5(1), kpackagestructure(7), plasmapkg2(1), plasma-desktop(1)

Copied to clipboard