You will need to delete some files so that you have a minimum amount of free space again. Which ones to delete will depend on the even that filled up the disk in the first place. Surely some unnecessary files have been created somewhere along the line, your best bet is to find them and delete them!
What can sometimes happen when a program gets out of control is that it can produce excessively large log files with multiple repeated messages. You can check the
/var/log directory for this. A good command to use is:
du -ah /var/log | sort -h
This will sort the largest files at the bottom, so that you can easily see if something has got out of control. The
/tmp directory (if it is part of your root filesystem) is another good place to look for problem files.
Another place to look is
/var/cache/apt/archives/, this contains the cache of
.deb packages downloaded by
apt. Files here can be safely removed with
If you can't find any other files to delete (although perhaps another users home directory is the place to try a
du), deleting old log files is probably the safest way to go. Many of the files in
/var/log will have numbers after them, the higher the number, the older the log. Many will also have a
.gz extension, this is just because they have been compressed to save space.
Other places worth checking are
/opt (some non-distro programs use this),
/root (the home directory for the root user).
aptitude can be used to purge all configuration files for removed packages. Although typically this will only free a few MBs at best (and won't work if the disk is so full that
apt-get won't work). The command line is:
sudo aptitude purge '~c'
Generally I wouldn't recommend uninstalling software unless you really have to, though perhaps the reason for the disk being full is that someone has been installing too much software.