[Linux] 升級unifi的相關錯誤

遇見的錯誤

E: Repository ‘http://dl.ubnt.com/unifi/debian stable InRelease’ changed its ‘Codename’ value from ‘unifi-5.14’ to ‘unifi-6.0’
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

解法:

sudo apt-get update --allow-releaseinfo-change

再來

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove

[LINUX] /boot 空間滿了

有一台Ubuntu主機有設定自動更新,但萬一太久沒進去關心一下,就會發現 /boot 區空間滿了,這時候想移除產生些空間都沒有辦法。

2016-07-05-1

查詢目前使用的內核

$ uname -a   

除了目前使用內核,其他多於老舊內核列出來

dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]'

把其他非使用的老舊內核刪除吧!

dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt-get -y purge