15. Freeing Up Disk Space

So you've installed your system, and you want to install X, but you don't have enough room on your disks to install it? What can you do to free up some disk space? There is a huge amount of space that can be freed up by deleting the unused material in a dpkg-based system.

  1. Strip libraries and binaries. Many libraries and binaries are distributed with debugging information. Running file on these files will tell you ``not stripped'' if so. When copying binaries to your root filesystem, it is good practice to use:

    objcopy --strip-all FROM TO
    Important: When copying libraries, be sure to use strip-debug instead of strip-all. objcopy is a binary found in the binutils package.

  2. Delete metadata in /usr/src/doc/* directories. These include changelog's, todo list's, readme's, etc., but be careful what you delete.

  3. Delete material in the /usr/share/locale directory.

  4. Delete material in the /usr/share/keymaps directory. You are stuck with the psion keyboard, and don't mess with it.

  5. Delete unused fonts from the /usr/share/consolefonts directory.