57

Each time apt-get tries to process triggers for shared-mime-info, it reports warnings like:

...
Processing triggers for shared-mime-info...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Unknown media type in type 'interface/x-winamp-skin'

I've checked /usr/share/mime-info but doesn't see any of them:

/usr/share/mime-info$ grep 'url/rtspu' *
(Got nothing)

So, how to clean up my system so it won't report these unknown media types?

Tim
  • 32,861
  • 27
  • 118
  • 178
Lenik
  • 10,398

4 Answers4

45

Backup the file that is causing the errors and update the systems mime database:

sudo mv -vi /usr/share/mime/packages/kde.xml /usr/share/mime/packages/kde.xml.bak
sudo update-mime-database /usr/share/mime

This should fix the warnings.

hakre
  • 207
  • 1
  • 4
  • 15
  • 26
    What are the (other) consequences of removing this file? – Sparhawk Mar 17 '14 at 11:06
  • 2
    What harm could this do? – Tim Dec 23 '14 at 18:34
  • 6
    If concerned about the consequences, instead of removing kde.xml, move it to kde.xml.bak and you'll have a backup. Thus far I've had no adverse effects with this approach. another method would be to edit the file and remove the fake mime types as discussed at http://mapopa.blogspot.com/2011/01/fixing-unknown-media-type-in-type.html – Elder Geek Mar 26 '15 at 14:22
17

This was discussed in Why does update-mime-database complain about uri/rtspt and other unusual types? It is caused by kde.xml and they have not fixed it yet. Here is a bug report.

Also it's uri/rtspu, not url/rtspu you should be grepping.

skfd
  • 500
10

You should check /usr/share/mime/packages for the specific xml that contains the phrase you get .

For example, my problem was Unknown media type in type 'chemical/...... I found the file /usr/share/mime/packages/chemical-mime-data.xml.

Using cat on the file showed me that the package was the same chemical-mime-data V 0.94

So I ran:

sudo apt-get remove chemical-mime-data
Tim
  • 32,861
  • 27
  • 118
  • 178