Delete files in debian-based did not free up space [closed]

I am using linux deepin 20.02.04 that based on debian 10.10 on my laptop. Some days before, I deleted some files (at least 60GB) from my partition with rm command. But theirs space didn't free up. Are there any way for solve this?


Solution 1:

ok so your are not using a "specific" File system.

On Linux or Unix systems, deleting a file via rm or through a file manager application will unlink the file from the file system's directory structure; however, if the file is still open (in use by a running process) it will still be accessible to this process and will continue to occupy space on disk. Therefore such processes may need to be restarted before that file's space will be cleared up on the filesystem.

you can find process using the files keeping them openned from lsof

for example :

 lsof -Fn -Fs | grep -i deleted

Files can also be deleted but scheduled for the real deletion so you have to sync

using the sync command

of course if you reboot your system, process are stopped & issue deseapper too.

Another point to consider is special files like sockets & logs always appending new datas so file is permanantly getting bigger & bigger for ever until user stop the process that is uselessly written for ever.