9

I just did:

sudo updatedb  
locate * microsoft *  

and it told me this:

/lib/modules/4.13.0-16-generic/kernel/drivers/hid/hid-microsoft.ko
/usr/lib/os-probes/mounted/20microsoft
/usr/lib/os-probes/mounted/efi/20microsoft
/usr/share/X11/locale/microsoft-cp1251
/usr/share/X11/locale/microsoft-cp1255
/usr/share/X11/locale/microsoft-cp1256
/usr/share/X11/locale/microsoft-cp1251/Compose
/usr/share/X11/locale/microsoft-cp1251/XI18N_OBJS
/usr/share/X11/locale/microsoft-cp1251/XLC_LOCALE
/usr/share/X11/locale/microsoft-cp1255/Compose
/usr/share/X11/locale/microsoft-cp1255/XI18N_OBJS
/usr/share/X11/locale/microsoft-cp1255/XLC_LOCALE
/usr/share/X11/locale/microsoft-cp1256/Compose
/usr/share/X11/locale/microsoft-cp1256/XI18N_OBJS
/usr/share/X11/locale/microsoft-cp1256/XLC_LOCALE
/usr/share/X11/xkb/geometry/microsoft
/usr/share/doc/libx11-dev/i18n/compose/microsoft-cp1251.html
/usr/share/doc/libx11-dev/i18n/compose/microsoft-cp1255.html
/usr/share/doc/libx11-dev/i18n/compose/microsoft-cp1256.html
/usr/share/fonts/X11/encodings/microsoft-cp1250.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1251.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1252.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1253.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1254.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1255.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1256.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1257.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1258.enc.gz
/usr/share/fonts/X11/encodings/microsoft-win3.1.enc.gz
/usr/share/mime/image/vnd.microsoft.icon.xml
/usr/src/linux-headers-4.13.0-16-generic/include/config/hid/microsoft.h  

Is it safe to remove them, or some of them (please specify)? Because I want the least possible microsoft or windows on my system!

  • 37
    Why would you remove them? They are not part of Windows, or necessarily from Windows. One is a driver for some Microsoft hardware, and the header file in the kernel source tree. Another is a MIME type definition for the .ico file format. Most are just character encoding definitions. Deleting the files would break packages (and would get replaced by later updates anyway). – dobey Nov 15 '17 at 17:20
  • (but, seriously, don't remove the kernel packages from your system.) – Federico Poloni Nov 16 '17 at 13:59
  • 1
    Why are people still arguing and commenting on this? The question was already answered and accepted. – dobey Nov 16 '17 at 20:17
41

These files have nothing to do with Windows, and are not from Microsoft. Deleting them will simply break some of the packages you have installed (and any features which rely on those files being there), and those files will simply be replaced when those packages get updated later anyway. There's no point in removing them.

  • 4
    From my understanding, most of these are character encodings used by Windows to extend ASCII, but nowadays they are used for legacy purposes since Unicode is the norm. – qwr Nov 15 '17 at 22:41
  • 9
    @qwr Yes, they are definitions for character encodings in X11. What they are however, is immaterial to the question of "is it ok to delete them," which is generally answerable by "no, deleting files manually, which are managed by packages, is not a good idea." – dobey Nov 15 '17 at 23:38
22

These files fall into four groups:

/lib/modules/4.13.0-16-generic/kernel/drivers/hid/hid-microsoft.ko
/usr/src/linux-headers-4.13.0-16-generic/include/config/hid/microsoft.h  

These are drivers and support files for Microsoft-branded input devices (keyboards and mice). They are vaguely Microsoft-related, but probably contain no Microsoft code. You can probably remove them safely, though if you've got Microsoft hardware, you might lose things like support for media keys or extra mouse buttons. I don't think any Microsoft hardware is completely incompatible with the generic USB or PS/2 drivers.

/usr/lib/os-probes/mounted/20microsoft
/usr/lib/os-probes/mounted/efi/20microsoft

These are part of the Grub bootloader, used to detect if there is a Microsoft operating system present or not on a separate partition/volume. I'm not familiar enough with the internals of Grub to say if deleting them would be harmless, or if it would break your system entirely.

/usr/share/X11/locale/microsoft-cp1251
/usr/share/X11/locale/microsoft-cp1255
/usr/share/X11/locale/microsoft-cp1256
/usr/share/X11/locale/microsoft-cp1251/Compose
/usr/share/X11/locale/microsoft-cp1251/XI18N_OBJS
/usr/share/X11/locale/microsoft-cp1251/XLC_LOCALE
/usr/share/X11/locale/microsoft-cp1255/Compose
/usr/share/X11/locale/microsoft-cp1255/XI18N_OBJS
/usr/share/X11/locale/microsoft-cp1255/XLC_LOCALE
/usr/share/X11/locale/microsoft-cp1256/Compose
/usr/share/X11/locale/microsoft-cp1256/XI18N_OBJS
/usr/share/X11/locale/microsoft-cp1256/XLC_LOCALE
/usr/share/X11/xkb/geometry/microsoft
/usr/share/doc/libx11-dev/i18n/compose/microsoft-cp1251.html
/usr/share/doc/libx11-dev/i18n/compose/microsoft-cp1255.html
/usr/share/doc/libx11-dev/i18n/compose/microsoft-cp1256.html
/usr/share/fonts/X11/encodings/microsoft-cp1250.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1251.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1252.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1253.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1254.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1255.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1256.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1257.enc.gz
/usr/share/fonts/X11/encodings/microsoft-cp1258.enc.gz
/usr/share/fonts/X11/encodings/microsoft-win3.1.enc.gz

These are files describing the Windows cp125* family of character encodings. You don't want to remove them: things will break badly if you ever visit a website using one of these encodings (about 5% of the web) or try to open a text document using one of them. They're Microsoft-related only in the sense that they describe Microsoft practices.

/usr/share/mime/image/vnd.microsoft.icon.xml

This simply describes the MIME type for the Windows Icon file format. Removing it means that .ico files will be described as "Data file" rather than "Windows Icon", but shouldn't have any other effects.

  • 2
    Don't remove the "microsoft" files from the kernel source if you want to build the kernel. – Joshua Nov 16 '17 at 3:43
  • Those particular encoding files probably aren't used for much, incidentally - they're more commonly called e.g. "windows-1252" or just "cp1252" - the most important one for that encoding is /usr/lib/x86_64-linux-gnu/gconv/CP1252.so. But removing them is still silly. – Random832 Nov 16 '17 at 18:06
  • 1
    You have misidentified the purpose of at least two of the files. The "os-probes" files are related to the detection of microsoft operating systems when building the grub boot menu. – Peter Green Nov 16 '17 at 20:44
  • @PeterGreen, fixed. – Mark Nov 16 '17 at 21:10
8

You could find out which package these files are part of, then decide that removing that package is wrong, by:

locate *microsoft* | xargs -n 1 dpkg -S

Of course, read man xargs and man dpkg.

  • 3
    This is actually rather dangerous advice. If I'm correct about how Ubuntu organizes its packages, only one of the files belongs to a package that's safe to remove, while the majority belong to packages that will break things in new and exciting ways if removed, and one belongs to a package that, if removed, will require re-installing the system to recover. – Mark Nov 15 '17 at 23:47
  • 2
    @Mark Please explain how it's "dangerous"? – waltinator Nov 16 '17 at 3:14
  • 7
    Because it's not clear to the average user what the purpose of a given package is, or what other files it may include. I don't have an Ubuntu system to check right now, but on my Gentoo system, /usr/share/fonts/X11/encodings/microsoft-cp1250.enc.gz is from a package with the innocuous-sounding name of "encodings". /lib/modules/4.13.0-16-generic/kernel/drivers/hid/hid-microsoft.ko and /usr/src/linux-headers-4.13.0-16-generic/include/config/hid/microsoft.h are both from packages with "kernel" in their names, but one is safe to remove and the other will destroy your system. – Mark Nov 16 '17 at 3:29
  • 5
    @Mark the answer explicitly says, "then decide that removing that package is wrong". That leaves no question whether or not it's safe to remove. – RonJohn Nov 16 '17 at 9:34
  • 1
    @Mark This answer says "This is how you determine what a file belongs too"... This is a vital part of knowing if the files can be deleted since, as you say, deleting specific packages will hose your system. He didn't say "Determine the package and uninstall them" - which is what you seem to be railing against. How else would you suggest someone determine where files come from? Does it need multiple warnings since everything has to be covered in bubble wrap these days? – WernerCD Nov 16 '17 at 12:38
2

Assuming you're running Ubuntu or a derivative thereof, you don't have to worry about "Having Microsoft or Windows" on your computer unless you went out of your way to install WINE. You're free to do whatever harm to yourself or your system you wish.

As with all advice given: User Beware.

  • 1
    WINE is neither Microsoft nor Windows. It's a re-implementation of the Windows programming interface (API) to allow applications written for Windows to run on a Linux system. – a CVn Nov 17 '17 at 10:57
  • That is the most accurate way to state things, what I was trying to suggest is that, without WINE for them to sit on/in those sorts of programs aren't doing anything. – Kaitensatsuma Feb 6 '18 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.