<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dpkg &#8211; acm&#039;s blog</title>
	<atom:link href="https://blog.acm.idv.tw/tag/dpkg/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.acm.idv.tw</link>
	<description>技術與生活隨筆</description>
	<lastBuildDate>Mon, 25 Jul 2022 09:05:59 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>

<image>
	<url>https://blog.acm.idv.tw/wp-content/uploads/2022/06/cropped-logo_kaffa9-3-32x32.png</url>
	<title>dpkg &#8211; acm&#039;s blog</title>
	<link>https://blog.acm.idv.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>apt upgrade因/boot空間不足導致更新失敗問題</title>
		<link>https://blog.acm.idv.tw/2022/07/25/apt-upgrade%e5%9b%a0-boot%e7%a9%ba%e9%96%93%e4%b8%8d%e8%b6%b3%e5%b0%8e%e8%87%b4%e6%9b%b4%e6%96%b0%e5%a4%b1%e6%95%97%e5%95%8f%e9%a1%8c/</link>
					<comments>https://blog.acm.idv.tw/2022/07/25/apt-upgrade%e5%9b%a0-boot%e7%a9%ba%e9%96%93%e4%b8%8d%e8%b6%b3%e5%b0%8e%e8%87%b4%e6%9b%b4%e6%96%b0%e5%a4%b1%e6%95%97%e5%95%8f%e9%a1%8c/#respond</comments>
		
		<dc:creator><![CDATA[kaffa9]]></dc:creator>
		<pubDate>Mon, 25 Jul 2022 09:05:59 +0000</pubDate>
				<category><![CDATA[技術]]></category>
		<category><![CDATA[系統維運]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://kaffa9.com/?p=592</guid>

					<description><![CDATA[近期在為幾台運行Ubuntu的機器使用apt upgrade進行套件更新時，遇到了/boot空間不足，導致更新失敗的問題，折騰了一下子，總算是將問題解決了，在此...<p class="read-more"><a class="btn btn-default" href="https://blog.acm.idv.tw/2022/07/25/apt-upgrade%e5%9b%a0-boot%e7%a9%ba%e9%96%93%e4%b8%8d%e8%b6%b3%e5%b0%8e%e8%87%b4%e6%9b%b4%e6%96%b0%e5%a4%b1%e6%95%97%e5%95%8f%e9%a1%8c/"> Read More<span class="screen-reader-text">  Read More</span></a></p>]]></description>
										<content:encoded><![CDATA[
<p>近期在為幾台運行Ubuntu的機器使用apt upgrade進行套件更新時，遇到了/boot空間不足，導致更新失敗的問題，折騰了一下子，總算是將問題解決了，在此做個筆記。</p>



<h2 class="wp-block-heading">問題</h2>



<p>我們使用基本apt工具進行更新：</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">apt update
apt upgrade</pre>



<p>若更新的套件包含linux-image-x.x.x.x-generic，且/boot（通常為獨立的分割區）空間不足，將無法完成更新。</p>



<span id="more-592"></span>



<h2 class="wp-block-heading">解法</h2>



<p>將較舊版且<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color"><strong>非目前使用中</strong></mark>的linux kernel移除。</p>



<h3 class="wp-block-heading">查詢當前kernel版本</h3>



<p>使用下列指令查詢目前使用的kernel版本：</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">uname -r</pre>



<h3 class="wp-block-heading">查詢已安裝的kernel</h3>



<p>使用下列指令查目前作業系統中，安裝了哪些版本的kernel：</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">dpkg --list | grep linux-image</pre>



<h3 class="wp-block-heading">移除舊版kernel</h3>



<p>因前一動 (apt upgrade) 還卡著，因此不管是 apt remove 或 apt purge 應該都無法移除linux-image-x.x.x.x-generic套件，需改用dpkg：</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">dpkg -r linux-image-x.x.x.x-generic</pre>



<p>一般來說，應該會有另一個名為linux-modules-x.x.x.x-generic的套件和linux-image-x.x.x.x-generic會有相依關係，也必須一併移除。</p>



<p>移除之後，/boot將會騰出一些空間，就可以繼續進行apt upgrade了。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.acm.idv.tw/2022/07/25/apt-upgrade%e5%9b%a0-boot%e7%a9%ba%e9%96%93%e4%b8%8d%e8%b6%b3%e5%b0%8e%e8%87%b4%e6%9b%b4%e6%96%b0%e5%a4%b1%e6%95%97%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
