xdg-icon-resource(1)
Install, uninstall, or manage desktop icon themes and resources following the XDG Icon Theme specification.
Synopsis
xdg-icon-resource install [OPTIONS] --size SIZE [--theme THEME] [--context CONTEXT] ICON_FILE [ICON_NAME]
xdg-icon-resource uninstall [OPTIONS] --size SIZE [--theme THEME] [--context CONTEXT] ICON_NAME
xdg-icon-resource forceupdate [OPTIONS] [--theme THEME]Description
xdg-icon-resource is a command-line tool for installing, uninstalling, and managing icon files in desktop icon theme directories. It handles the placement of icon files in XDG-compliant locations (typically ~/.local/share/icons/), making icons available to desktop applications and environments.
The command supports multiple icon sizes, themes, and contexts (such as applications, mimetypes, or categories). It automatically creates necessary directories and can trigger icon theme cache updates to ensure icons appear immediately in applications.
Common options
| Flag | What it does |
|---|---|
install | Install an icon file into the icon theme |
uninstall | Remove an icon from the icon theme |
forceupdate | Force update of icon theme caches |
--size SIZE | Specify icon size in pixels (e.g., 16, 22, 32, 48, 64, 128) |
--theme THEME | Install into specified theme (default: hicolor) |
--context CONTEXT | Icon context such as 'applications', 'mimetypes', 'devices' (default: applications) |
--mode MODE | Installation mode: user (default) or system |
--novendor | Install icon without vendor prefix |
--noupdate | Do not update icon theme cache after installation |
Examples
Install a 48x48 pixel icon named 'myapp.png' as application icon 'myapp'
xdg-icon-resource install --size 48 myapp.png myappInstall a PDF document icon in the mimetypes context
xdg-icon-resource install --size 64 --context mimetypes document.png application-pdfInstall icon into the gnome theme at 32x32 size
xdg-icon-resource install --size 32 --theme gnome icon.png toolnameRemove the previously installed myapp icon at 48x48 size
xdg-icon-resource uninstall --size 48 myappForce regeneration of icon cache for the hicolor theme
xdg-icon-resource forceupdate --theme hicolorInstall icon without vendor name prefix in the path
xdg-icon-resource install --size 128 --novendor logo.png appname