I was wondering: is it possible to replace the GNU coreutils with Busybox in Ubuntu? Is that safe? Could I replace something else (like binutils and bash) with Busybox? How much free disk space would I get with that? And, if plausible, how could I do that?
It's not possible. Busybox on Ubuntu doesn't support the full set of utilities that coreutils provides. Examples include
nohup. Packages can safely use programs installed by
coreutils without depending on it as a package, since it's an essential package; there's no telling what coreutils commands a package might be using. You could try building Busybox from source, since the full set of commands do include
uudecode, which could server as an alternative to
base64. However, even that has missing commands like
You could try. Do something like:
/bin/busyboxto the coreutils commands which are supported by
- Install a placeholder
coreutilspackage with a higher epoch number than the Ubuntu coreutils package, so that a package upgrade will never happen for coreutils.
- Install only those binaries from the actual
coreutilspackage which Busybox didn't support.
- Hope that the system doesn't crumble. Get used to manually upgrading coreutils commands when the package gets patched.
It's also not possible to replace bash or binutils. Bash offers a far richer syntax than Busybox ash. And as far as I can tell, binutils has nothing in common with Busybox.
Ubuntu just isn't the system you want, if you're that concerned with space. Look at some of the alternatives mentioned in this Super User post.