APT checks this and shows you the information:
Need to get 8314 kB of archives.
After this operation, 30.3 MB of additional disk space will be used.
It also errors out if you do not have enough free space:
You don't have enough free space in %s
** Changed in: apt (Ubuntu)
Status:
** Changed in: apt (Ubuntu)
Importance: Undecided = Wishlist
** Changed in: apt (Ubuntu)
Status: New = Triaged
--
apt does not check Free Disk Space before upgrading
https://bugs.launchpad.net/bugs/561238
You received this bug notification because you are a member of Ubuntu
Bugs,
** Summary changed:
- Update Manager does not check Free Disk Space before upgrading! Leads to
failed/broken packages. package linux-headers-2.6.27-17 2.6.27-17.46 failed to
install/upgrade: failed in buffer_write(fd) (10, ret=-1): backend dpkg-deb
during