Why so many files in /usr/share/app-install/desktop?

For 14.04, I’m trying out Lubuntu LTS.

If I run ls -l /usr/share/app-install/desktop, I get a list of 3085 .desktop files. All except one are dated Apr 18. The exception is:

-rw-r--r-- 1 root root  6328 Mar 28  2013 applications.menu

From the dates, it’s clear that all these are installed by default and not by me.

  • Doesn’t each GUI-based program bring in its own .desktop file at the time it’s installed (mostly in /usr/share/applications)?

  • Then why are these thousands of other .desktop files needed? From their names, most of them haven’t anything to do with Lubuntu.

  • Their names are different from regular .desktop files (such as those in /usr/share/applications): many, not all, are like name:name.desktop whereas the regular ones are just name.desktop.
  • The ones I looked at all have a line with X-AppInstall-Popcon=nnn where nnn is a string of digits. I know that Popcon “gathers statistics determining which packages are the most popular with Ubuntu users”. But why is that part of these .desktop files?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

The .desktop files under /usr/share/app-install/desktop are installed by the app-install-data Install app-install-data package. This package provides metadata about applications that is used by the Ubuntu Software Center and (in your case) the Lubuntu Software Center. The package also contains a copy of each application’s icon that is referenced from the .desktop files.

Basically, these .desktop files are very similar to the .desktop files that are used by your desktop environment’s menu for launching applications. However, as you noticed, they have additional metadata added for things like popularity counts and search keywords.

And, as is probably obvious, the app-install-data package installs a full set of .desktop files and icons on all Ubuntu systems regardless of which flavor is installed, which applications are installed by default, or which applications have been installed or removed on a particular system.

The purpose of all of this is to give users a polished Software Center experience that provides information about all applications that can be installed in Ubuntu without having to query and cache all of it from a web service. The app-install-data package is built for each Ubuntu release from all known applications that are in the Ubuntu repositories. And that allows the user to open the Software Center, search for applications by name or keyword, and be able to see the same name, description, and icon that will show up in their desktop menu or launcher when they install the application.

These metadata files and icons can be removed if you want by simply uninstalling the package that contains them:

sudo apt-get remove app-install-data

Note that removing app-install-data will in turn force removal of lubuntu-software-center, lubuntu-desktop, software-center, and ubuntu-desktop. However, removal of these packages will not affect Synaptic, aptitude, apt-get, or any other front-ends for the apt package manager. Only the Ubuntu Software Center application requires these files.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply