Cleanup the appliance disk?

Hale's picture

I want to reduce the disk size of the fileserver appliance. For me it is a complete mystery what can take 1.5 Gb of disk space without any multimedia or performance engines. Windows NT takes less in core.

Is there any cleanup tool tuned for TKL or any step-by-step guide for pre-deployment cleanup.

... It would be wonderful to fit fileserver on a floppy...

Jeremy Davis's picture

Regardless, if you are curious what takes up the space, install ncdu and have a look. FWIW this is how to do it (no sure of your Linux skill level):

apt-get update && apt-get install ncdu
ncdu /

Already the TKL installs are pretty frugal (unless you go the path of minimalist distros like Puppy or DamnSmallLinux. And you will have no hope of fitting any decent Linux distro on a floppy... Especially when you consider that the kernel alone is ~27MB (packed - ~78MB when extracted...)

But if you want to minimise the installed size keep in mind that you are removing features... If they are of no use to you then that's fine, but as I say above, TKL is already fairly frugal IMO. But bottom line is that any services you don't plan to use can be removed, also be aware that by default TKL has etckeeper installed which keeps backup copies of all config files in /etc. Over time this can get quite large.

Hale's picture

I believe there are no sources and distros cached like in mandrake/redhat ? I am just not that familiar with linux to remove this data blindly on my own...

"ncdu",

thanks!


Jeremy Davis's picture

But over time deb installers can build up to quite a sizeable apt cache.

To remove the 'stale' cache (packages that are outdated):

apt-get autoclean

To remove all cached packages:

apt-get clean

And I certainly wouldn't just blindly start deleteing files, but any core stuff should warn you that it may totally break your system if you uninstall it (if you use apt-get). That's not to day that you couldn't break it, but it should (hopefully) still at least continue to function as a basic OS...

Another thing that can take up space over time are old kernels. There are plenty of tutorials online on how to remove old/out of date ones. Just remember to have backups of anything important! :)

Post new comment