There's another question about AppStream that has —for better or worse— focussed on what seems to be a particular bug in AppStream but that left me realising I don't have a clue what this thing actually is.
man appstreamcli
(the application taking the CPU off the deep end) throws some technical jargon at the confusion:
appstreamcli is a small helper tool to work with AppStream metadata and access the AppStream component index from the command-line. The AppStream component index contains a list of all available software components for your distribution, matched to their package names. It is generated using AppStream XML or Debian DEP-11 data, which is provided by your distributor.
So... What is it actually there for? Do all desktop (and their related package managers) use it?
By all of which I actually mean: what will break when I tear this out with my teeth?
The AppStream project page adds a little more jargon but does go onto say:
So this is basically what the new software centres are using to get their data from, rather than directly from Apt.
appstreamcli refresh
(the thing people are freaking out about using all the CPU) is the process that runs after anapt update
to regenerate its own data. As mentioned in the question, there appears to be a bug here.You can see what needs it based on the reverse dependencies:
So at a base level to answer "What will break [...]?", ^^ that stuff.
Both Gnome's and KDE's software tools depend on it today. More may in the future. Most of these indirect package manager are just "
recommends
" so if you only ever useapt
or tools that only use Apt's package library directly (too many to list), you can get rid of it without removing the whole desktop environment.You can simulate a removal with
apt -s remove appstream
:This is under KDE so don't assume anything from that. It seems safe enough.
Update:
Running
apt -s remove appstream
in Kubuntu 18.04 is slightly different:I have added
DefaultEnabled "false";
in sectiondeb::DEP-11
(see/etc/apt/apt.conf.d/50appstream
) to avoid the download of the DEP-11 metadata.To disable all unwanted download of DEP-11 metadata and especially icons I have set explicitly or changed to
DefaultEnabled "false";
(see60apper
and60icons*
files anddeb::DEP-11-icons*
sections).The appstream cache is refreshed and stored here with 19MiB of total size on my system:
UPDATE: Some numbers of today's
apt-get update
: Reduced download size from normally approx. 50MiB down to 1,5MiB.UPDATE-2: Shows all
DEP-11
APT configs:root# apt-config dump | grep DEP-11
Note-1: Involved are the APT configs of the packages
appstream
,apper
andapt-config-icons
. Note-2: I do not use GUI based package-managers likeplasma-discover
andgnome-software
to upgrade software which require a refresh of the DEP-11 metadata and icons.