Any idea how to remove this file and free up the root space?
The dead-letter queue doesn't need to be explicitly created and can't be deleted or managed independent of the main entity.
You can delete a message from a dead-letter queue directly from the Dead-Letter Queue Messages workspace.
The Dead Letter mailbox stores messages that could not be added to a regular mailbox. The Dead Letter mailbox is located under the root mailbox as /DeadLetter.
letter is usually created by mail client such as /usr/bin/mail, when you abort the message being sent, a copy of the message will be saved in your home folder: dead.
If you have removed it and the space still isn't freed, then it means a process has a file handle opened on it.
Try and find the PID of the process using, for instance:
for process in /proc/[0-9]*; do
for fd in $process/fd/*; do
file=$(readlink -f $fd)
if [ "$file" = "/root/dead.letter" ]; then
echo $process
fi
done
done
Then kill it/them.
You know about lsof
(http://linux.die.net/man/8/lsof) ?
In this case:
sudo lsof /root/dead.letter
This prints out info's about the process having the file open. You still have to kill that process.
If the above script does not work, One can just think of the processes which might be having the handle to such files occupying space in root or home directory.
Kill such processes and the disk space will be freed
You can use (ps -ef | grep process_name)
to find out the process id.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With