Accidentally deleted mine types with CLAM TK, how to restore file extensions


Hi, has anybody else deleted mime types, (I believe thats the file I deleted and broke extensions). Now
I can’t load JPEG files etc without hand picking the app to open them.

Is there a way to restore my mime types?



You mean you don’t have a backup plan? :wink:

what file did you delete?


I dont remember. :slight_smile: It said mime something.

I had CLAMTK set to detect ‘PUA’S’ which I stopped doing, because it usually leads me to deleting files
that I shouldn’t.


I’ve done this before in ubuntu and other pcbsd installs.

It’s usually listed by the LIBRE OFFICE files it also false positives as PUA’s.



try --> ls -la .config/lumina-mimeapps.list

that is the lumina specific.

this is not windo$, so need to scan for virus/worm/any other windo$ junk

if you remember which file(s) you deleted, ask. if small enough I’m sure some can copy/paste into for you


I think the database directory for the mimetypes information is in /usr/local/share/mime/*;
There was a particular package which installed that database (shared-mime-info), and if you forcibly reinstall that package it will re-add that database for you.
pkg update -f shared-mime-info


Hi, thanks for the help, it says this though when I type what you gave me

Usage: pkg update [-fq] [-r reponame]

For more information, see ‘pkg help update’.


bad advice from @beanpole135 :wink:

should be

pkg install -f shared-mime-info

and yes, I typed what he recommended.

Thats’ how I got the command correct


Thanks for the fix - I was going off memory there… :wink:


it look right, until I tried it.

found need to double check our posts, since we are prone to typos. And the need to point out “your” mistake on a semi-public forum :sunglasses: :innocent:


okay, about to reboot thanks again

Installed packages to be REINSTALLED:
shared-mime-info-1.5 [trueos-major]

Number of packages to be reinstalled: 1

426 KiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching shared-mime-info-1.5.txz: 100% 426 KiB 436.4kB/s 00:01
Checking integrity… done (0 conflicting)
[1/1] Reinstalling shared-mime-info-1.5…
[1/1] Extracting shared-mime-info-1.5: 100%
Unknown media type in type 'all/all’
Unknown media type in type ‘all/allfiles’


OKay, now it worked. thanks!