Ubuntu low storage problem fixing for docker, large log file, and deleted file

First backup your docker-related storage data like MySQL and Postgres and other storage related data:

Run the below command to find the large file:

sudo du -sh /var/log/* | sort -rh

Vacuum the volume and keep only 100MB of log data:…


This content originally appeared on DEV Community and was authored by Shaikh Al Amin

First backup your docker-related storage data like MySQL and Postgres and other storage related data:

Run the below command to find the large file:

sudo du -sh /var/log/* | sort -rh

Vacuum the volume and keep only 100MB of log data:

sudo journalctl --vacuum-size=100M

Clean all docker volume-related data:

docker system prune -a

Clean undelete data: at the last stage if the disk space issue remains, run the below command:

sudo lsof | grep '(deleted)' | awk '{print $2}' | xargs sudo kill -9


This content originally appeared on DEV Community and was authored by Shaikh Al Amin


Print Share Comment Cite Upload Translate Updates
APA

Shaikh Al Amin | Sciencx (2024-09-02T15:19:49+00:00) Ubuntu low storage problem fixing for docker, large log file, and deleted file. Retrieved from https://www.scien.cx/2024/09/02/ubuntu-low-storage-problem-fixing-for-docker-large-log-file-and-deleted-file/

MLA
" » Ubuntu low storage problem fixing for docker, large log file, and deleted file." Shaikh Al Amin | Sciencx - Monday September 2, 2024, https://www.scien.cx/2024/09/02/ubuntu-low-storage-problem-fixing-for-docker-large-log-file-and-deleted-file/
HARVARD
Shaikh Al Amin | Sciencx Monday September 2, 2024 » Ubuntu low storage problem fixing for docker, large log file, and deleted file., viewed ,<https://www.scien.cx/2024/09/02/ubuntu-low-storage-problem-fixing-for-docker-large-log-file-and-deleted-file/>
VANCOUVER
Shaikh Al Amin | Sciencx - » Ubuntu low storage problem fixing for docker, large log file, and deleted file. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/02/ubuntu-low-storage-problem-fixing-for-docker-large-log-file-and-deleted-file/
CHICAGO
" » Ubuntu low storage problem fixing for docker, large log file, and deleted file." Shaikh Al Amin | Sciencx - Accessed . https://www.scien.cx/2024/09/02/ubuntu-low-storage-problem-fixing-for-docker-large-log-file-and-deleted-file/
IEEE
" » Ubuntu low storage problem fixing for docker, large log file, and deleted file." Shaikh Al Amin | Sciencx [Online]. Available: https://www.scien.cx/2024/09/02/ubuntu-low-storage-problem-fixing-for-docker-large-log-file-and-deleted-file/. [Accessed: ]
rf:citation
» Ubuntu low storage problem fixing for docker, large log file, and deleted file | Shaikh Al Amin | Sciencx | https://www.scien.cx/2024/09/02/ubuntu-low-storage-problem-fixing-for-docker-large-log-file-and-deleted-file/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.