3

I am trying to reduce the disk space on my computer, and du shows that the library directories (/usr/liband /lib) and binary directories (/sbin, /bin, /usr/bin, /usr/sbin) take up the most space apart from logs which I have already emptied.

Is it safe to strip all the binaries and libraries, and if so what options to strip should I use? I am hesitant to trash my system and waste time reinstalling.

steve
  • 21,582
  • 5
  • 48
  • 75

1 Answers1

4

Stripping is supposed to be safe, all it does is remove symbols from binaries, and they are only needed for debugging. So it should be safe to strip everything.

In most Linux distributions (Mint included), binaries and libraries are stripped by default, and symbols are made available separately in debug packages. A binary or library which is not stripped may be left that way for a reason; for example, Python libraries are usually not stripped so that sensible stacktraces can be provided (but that's not an issue for you). Generally speaking if you're not developing it shouldn't be an issue though.

Looking at my systems, the only non-stripped binaries that give me pause are Grub's modules; I don't know why they're not stripped, so I'd be wary of stripping them myself...

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164