解決Ubuntu 16.04下提示boot分區(qū)空間不足的辦法
前言
因?yàn)閘inux內(nèi)核一直在更新,更新后,舊的內(nèi)核就不在使用,但舊的內(nèi)核文件還在boot里面,占據(jù)著空間,更新幾次過后boot分區(qū)就會(huì)被占滿,顯示boot磁盤空間不足。
解決辦法
將不用的內(nèi)核文件刪除,釋放空間。
步驟如下
一、查看已安裝的內(nèi)核dpkg --get-selections |grep linux-image
eason@eason:~$ dpkg --get-selections |grep linux-image linux-image-4.4.0-21-generic deinstall linux-image-4.4.0-57-generic install linux-image-4.4.0-59-generic install linux-image-4.4.0-62-generic install linux-image-4.4.0-64-generic install linux-image-extra-4.4.0-21-generic deinstall linux-image-extra-4.4.0-57-generic install linux-image-extra-4.4.0-59-generic install linux-image-extra-4.4.0-62-generic install linux-image-extra-4.4.0-64-generic install linux-image-extra-virtual install linux-image-generic install eason@eason:~$
后面帶deinstall
的為已刪除的內(nèi)核,可以忽略
二、使用uname -a
查看自己當(dāng)前啟動(dòng)的是哪個(gè)內(nèi)核
eason@eason:~$ uname -a Linux eason 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
從輸出可知我們當(dāng)前啟動(dòng)的內(nèi)核是4.4.0-62-generic
三、運(yùn)行apt-get remove
命令卸載其他內(nèi)核,為了保險(xiǎn)起見,保留最近的一兩個(gè)版本。
sudo apt-get remove linux-image-4.4.0-57-generic sudo apt-get remove linux-image-4.4.0-59-generic sudo apt-get remove linux-image-extra-4.4.0-57-generic sudo apt-get remove linux-image-extra-4.4.0-59-generic
如提示有未卸載干凈的可以執(zhí)行sudo apt-get remove
來卸載。
總結(jié)
以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來一定的幫助,如果有疑問大家可以留言交流。
相關(guān)文章
Linux INotif機(jī)制詳解及實(shí)例代碼
這篇文章主要介紹了Linux INotif機(jī)制詳解及實(shí)例代碼的相關(guān)資料,需要的朋友可以參考下2017-01-01解決fatal:remote error:You can''t push to git://github.com/use
這篇文章主要介紹了解決fatal:remote error:You can't push to git://github.com/username/*.git問題的辦法的相關(guān)資料,需要的朋友可以參考下2016-12-12