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?

  • 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. Commented Aug 8, 2012 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .