LinuxCommandLibrary

plasmapkg

Install, update, and manage Plasma packages

SYNOPSIS

plasmapkg command [options] [arguments]

Common commands include:
install <path_to_package_file_or_id> [--type <type>] [--force] [--global]
remove <package_id> [--type <type>] [--global]
update <package_id> [--type <type>] [--force] [--global]
list [--type <type>] [--global]
query <package_id> [--type <type>] [--global]

PARAMETERS

--type <type>
    Specifies the type of Plasma package to manage (e.g., `plasmoid`, `wallpaper`, `look-and-feel`, `kwinscript`). This is crucial as `plasmapkg` handles various package types.

--install <path_or_id>
    Installs a Plasma package from a local file path or a store ID. This option should be used as a command argument.

--remove <id>
    Removes an installed package by its unique ID. This option should be used as a command argument.

--update <id>
    Updates an installed package by its ID. This option should be used as a command argument.

--list
    Lists all installed packages or packages of a specific type if `--type` is also provided. This option should be used as a command argument.

--query <id>
    Displays detailed information about a specific package by its ID. This option should be used as a command argument.

--force
    Forces the operation, often used to overwrite existing packages during installation or update, or to ignore warnings.

--global
    Installs or manages packages globally (for all users) instead of locally (for the current user). Requires appropriate permissions (e.g., `sudo`).

--non-interactive
    Prevents prompts and confirmation questions, useful for scripting automated tasks.

--version
    Displays the version information of the `plasmapkg` utility.

--help
    Displays a help message with command usage and available options.

DESCRIPTION

The `plasmapkg` command-line utility is used for managing Plasma packages. These packages can include widgets (plasmoids), themes, scripts, KWin scripts, data engines, wallpaper plugins, and more, which extend the functionality and appearance of the KDE Plasma desktop. It allows users and developers to install new packages from local files or online stores, remove existing ones, update installed packages, list available or installed packages, and query details about specific packages. It acts as a backend tool for Plasma's package management, often utilized by graphical tools like Plasma Discover or for scripting automated installations.

CAVEATS

  • Package Types: It's critical to specify the correct --type for most operations, as `plasmapkg` manages different kinds of Plasma components, and operations are type-specific.
  • Permissions: Using the --global option requires root or sudo privileges, as it installs packages system-wide. Without it, packages are installed in the user's local configuration directory (e.g., ~/.local/share/plasma/plasmoids/).
  • Dependencies: `plasmapkg` does not automatically resolve external software dependencies. If a plasmoid requires a specific library, you must install it separately through your distribution's package manager.
  • Source: Packages downloaded from stores (like store.kde.org) or discovered locally must be valid Plasma packages. Incorrectly formatted or malicious packages could cause issues.

LOCAL VS. GLOBAL INSTALLATION

By default, `plasmapkg` installs packages into the current user's local Plasma data directories (e.g., ~/.local/share/plasma/plasmoids). To install packages for all users on the system, the --global option must be used, typically with sudo. This distinction is important for multi-user systems, affecting where the package files are placed and who can access them.

PACKAGE IDS

When using the remove, update, or query commands, `plasmapkg` requires a unique package ID. This ID is often derived from the package's name or its unique identifier within the package's metadata (e.g., metadata.desktop file). The list command can help in identifying these IDs for currently installed packages.

HISTORY

The `plasmapkg` command evolved from its predecessors, `kpackagetool` (for KDE4) and `kpackagetool5` (for early Plasma 5). As the KDE Plasma desktop matured, the `plasmapkg` name became standard for managing Plasma-specific components, reflecting its direct integration with the Plasma framework. It serves as the primary command-line interface for Plasma's package management capabilities, handling the lifecycle of various Plasma extensions.

SEE ALSO

kpackagetool5(1), plasma-discover(1), qdbus(1)

Copied to clipboard