UPX stands for The Ultimate Packer for eXecutables, an efficient multiplatform for several different executable formats. It is easy to use, unobtrusive and has negligible performance impact. On the other hand, it can compress only executables, while much more space could be reclaimed by compressing e.g. the whole /usr (using squashfs, fuse-compress, compfused or such).
You can really benefit from upx only if you remove unionfs or use upx exclusively on newly installed or updated packages, otherwise the compressed executables will take additional diskspace on the /dev/sda2 partition!
apt-get install upx-ucl-beta
upx --brute /usr/bin/executable_name
The compression takes a while, you can leave out the –brute switch to make it much faster (and very slightly less efficient). Decompression will be very fast in any case.
If you are using unionfs, to find out the list of executables you can use upx on to save space, mount /dev/sda2 somewhere:
sudo mkdir /tmp/mnt sudo mount /dev/sda2 /tmp/mnt -o rebind
and go to the /tmp/mnt/usr/bin directory - yuo can compress the executables directly there.