【Notes】Temporarily Increasing /tmp Space on Linux

During program installation,The message 'No more space left on device' appears,Check with df -h,It means /tmp is full。

My /tmp is not a separate partition,Is shared with / Same partition,And / Still has space,所以可以透過重新 mount 的指令來暫時增加 /tmp 的空間。

df -h /tmp
#查詢 /tmp 佔用空間。

sudo mount -o remount,size=15G /tmp/
#將 /tmp 大小改成 15G。

df -h /tmp
#確認 /tmp 的佔用 % 是否改變。

 

若要清空 /tmp,可以執行以下指令:

sudo rm -r /tmp/*

 

【參考連結】

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.