Removing unused space in a stored file. Saving a copy of a file may compact the file by default if the original file was updated several times. Updating tends to fragment a file, which can cause space to be wasted, but saving the file as a copy stores the data sequentially from the start.Compacting MailboxesAn email mailbox is a file that contains multiple messages. Deleting messages within the file often works like deleting files on the disk. The data are still intact, but the index to the data is marked as deleted. Compacting a mailbox eliminates the wasted space, which may be done automatically by the email program or by the user selecting a Compacting option from a menu. In email jargon, a mailbox may be called a "folder," but it is very often just a type of file.