There is a few common reasons for free disk space to increase when the system is rebooted.
- Files which are currently held open by any running process will remain on the disk even if the last reference to the file is deleted. The file will remain until the last process holding it open has closed it or terminated. On a reboot all such files would finally be deleted.
- It is a sensible practice to have a startup script clean out the contents of
/tmp
early during startup. This can also free up space.
Since both of the above involve files being deleted, it is difficult (sometimes impossible) to find out what exactly was taking up that disk space previously.
Since we'd be talking about files which have already been deleted the way to find out about it involves using a program which can read directly from the block device and that way bypass the file system. Moreover even if the inode and all the blocks of a deleted file could still be identified, that wouldn't tell you what name the file has, which makes it harder to figure out what those files were.
Having more than 50% of the total disk space freed up this way across a reboot is quite unusual. But it could happen if you had a large file or a large file in /tmp
.
If a cleanup of /tmp
is the reason, then you should not find any old files in /tmp
. You can run find /tmp -mtime +0 -type f
to find any files older than 24 hours. Additionally it would mean /tmp
is not a separate file system. If you run df /tmp
you will see whether /tmp
is a separate mount point or part of your root file system.