IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Saving Space mini-HOWTO

Search Howtos :Match :
Next Previous Contents

3. The procedure

3.1 Removing the Kernel Sources

The kernel sources take up more than 20 Mb, and you may want to remove them. If so, I suggest that you compile a new kernel that is tailored to your machine once and for all, then get rid of the sources. Take care, though.

I don't recommend that you remove the kernel sources unless you are sure that your machine is properly configured. Besides, you need the kernel #includes to compile C programs. Think twice!

If you do decide so, do not remove the include/linux tree unless you know you'll never compile applications on your machine.

3.2 Pruning Out Applications

Now, decide which applications you really need. Some may prove redundant: for instance, are you sure you can't live without emacs? You could use jed instead.

It's up to you to decide what you want to keep. Some general points:

  • gcc is a fairly large package. It's needed to recompile the kernel and all the applications for which there are no pre--built Linux binaries. It's also needed, of course, if you write your own C or Fortran (with f2c or g77) programs; consider your needs before removing it. Other compilers like lcc are fine, but not up to gcc level. I suggest that you keep it;
  • X11 is awfully large, but it's a nice thing to have. If you decide you can't give it up, at least try to make do with as little as necessary: only the right X server, one simple window manager, only one xterm, no 100 dpi fonts, and so on;
  • TeX and accompanying packages are very large indeed. Giving up LaTeX and sticking to plain TeX saves a lot of space; giving up X11 previewers like xdvi and ghostview is possible if you use dvitty, dvivga and some such. Eliminating the need for X11 dviware could even make X11 redundant;
  • games are never ``necessary''.

3.3 Stripping Binaries

Let's start reducing the size of binaries. Move to /usr/bin and issue the command

machine:/usr/bin# strip *

which will do away with symbols embedded in binaries. Repeat this step in /usr/X11R6/bin/ and other directories containing executables you may have (don't forget to locate TeX's and gcc's binaries), but do not run it under /sbin, /bin, or /usr/sbin/ if you value your installation!

3.4 Compressing with upx

First, install upx and read its documentation. Then go to /usr/bin and run it with the command upx *; it will compress all executables, including suid ones (tcx wouldn't). Repeat this step in other directories as seen above.

Remember to compress the executables whenever you install a new package!

3.5 Gzipping around

There are lots of other files that can be compressed once and for all. Let's start with /usr/doc/; move to this directory and issue the command

machine:/usr/doc# find . -type f -exec gzip -9 {} \; 2> /dev/null

Remember to compress the docs whenever you install a new package!

Repeat this step in the directory containing the documentation for TeX (on my system, /usr/lib/texmf/texmf/doc/. If you're really sure, remove these directories altogether.

Now, install zlibc and compile it. If your system is like mine, the compilation process will abort complaining about a missing (static) libc. Never mind; you'll find a file called uncompress.o that is what's needed. Move it to /usr/local/lib/ and add this line to your /etc/profile:

export LD_ELF_PRELOAD=/usr/local/lib/uncompress.o

Now, you can compress with gzip not only documentation, but also data files: the applications that use them will be able to use them nonetheless. In theory, the trick should work with most applications, but in practice your degree of success may vary. Mine was rather unimpressive.


Next Previous Contents
Search Howtos :Match :
DbVisualizer 6.5.2
The Universal Database Tool
PhpMyAdmin 3.1.2 rc1
Php front-end to MySQL administration
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
LimeWire 5.0.4
Gnutella Client
WebGUI 7.6.8
A fully featured content management system.
GTK2 2.14.7
GUI Toolkit
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info