Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My system: Debian 6.04, sda is working disk, sdb is my USB disk.
I installed Debian onto the USB drive this way, to edit grub file on sda,
nano /boot/grub/grub.cfg to add the new lines

menuentry 'Debian 6.0 from hard disk to install into usb' {
    set isofile="(hd0,6)/debian.iso"
    loopback loop $isofile
    linux (hd0,6)/vmlinuz
    initrd (hd0,6)/initrd.gz
}

where the vmlinuz and initrid.gz is from ftp.debian.org/debian/dists/testing/main/installer-i386/current/images/hd-media/, and the debian.iso is from http://www.debian.org/distrib/netinst.

When I now reboot, I can go into install UI, to finish my installation on USB.
The problem is: my USB is 4GB, the iso image is only 46MB -- but it uses 3GB to install, so there is so little space left, which is strange, since the iso is only 46MB...?

How can I cut down the installed space?

share|improve this question
    
The netinst distribution is a minimal image that doesn't have many packages, most of what it installs is downloaded as needed which explains the big size difference. –  Matthew Scharley Aug 8 '12 at 1:13

1 Answer 1

The netinst ISO contains only the installation program and some core software that you need to start the system, obtain network access and download the rest of the packages.

If you want to use less space, there's no miracle: you'll have to uninstall some packages. You can run a decent system in 3GB, but you'll have to make choices.

The following command lists the installed packages and their size in ascending order:

dpkg-query --showformat '${Installed-Size} ${Package}\n' -W '*' | grep '^[0-9]' | sort -n

If you want to cut down, start from the bottom of the list (the largest packages). Of course, some of these packages may be necessary, so don't uninstall a package unless you know you don't need it.

Once you've identified large packages you think you can live without, use an interactive tool such as Aptitude or Synaptic to try and remove them. Check their dependencies: maybe you aren't using that package directly but some other package that you use requires it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.