df and du discrepancies

The unix tools df (disk free) and du (disk usage) sometimes report numbers that don’t add up in a sane way. Here are some reasons why that can happen:

Also, if a program creates a file and then deletes it. The space allocated to that file may not be released back to the file system until that program terminates.