You are viewing an old revision of this post, from August 20, 2018 @ 09:37:56. See below for differences between this version and the current revision.

Kaskus I : Partisi /boot belum full 100% dan apt dapat digunakan

1. Check the current kernel version

$ uname -r 

It will shows the list like below:

3.19.0-64-generic

2. Remove the OLD kernels

2.a. List the old kernel

$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`

You will get the list of images something like below:

linux-image-3.19.0-25-generic
linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic
linux-image-extra-3.19.0-25-generic
linux-image-extra-3.19.0-56-generic
linux-image-extra-3.19.0-58-generic
linux-image-extra-3.19.0-59-generic
linux-image-extra-3.19.0-61-generic

2.b. Now its time to remove old kernel one by one as

$ sudo apt-get purge linux-image-3.19.0-25-generic
$ sudo apt-get purge linux-image-3.19.0-56-generic
$ sudo apt-get purge linux-image-3.19.0-58-generic
$ sudo apt-get purge linux-image-3.19.0-59-generic
$ sudo apt-get purge linux-image-3.19.0-61-generic
$ sudo apt-get purge linux-image-3.19.0-65-generic

When you’re done removing the older kernels, you can run this to remove ever packages you won’t need anymore:

$ sudo apt-get autoremove

And finally you can run this to update grub kernel list:

$ sudo update-grub

1. Check the current kernel version

$ uname -r 

It will shows the list like below:

3.19.0-64-generic

2. Remove the OLD kernels

2.a. List the old kernel

$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`

You will get the list of images something like below:

linux-image-3.19.0-25-generic
linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic
linux-image-extra-3.19.0-25-generic
linux-image-extra-3.19.0-56-generic
linux-image-extra-3.19.0-58-generic
linux-image-extra-3.19.0-59-generic
linux-image-extra-3.19.0-61-generic

2.b. Now its time to remove old kernel one by one as

$ sudo apt-get purge linux-image-3.19.0-25-generic
$ sudo apt-get purge linux-image-3.19.0-56-generic
$ sudo apt-get purge linux-image-3.19.0-58-generic
$ sudo apt-get purge linux-image-3.19.0-59-generic
$ sudo apt-get purge linux-image-3.19.0-61-generic
$ sudo apt-get purge linux-image-3.19.0-65-generic

When you’re done removing the older kernels, you can run this to remove ever packages you won’t need anymore:

$ sudo apt-get autoremove

And finally you can run this to update grub kernel list:

$ sudo update-grub

Kaskus II : Partisi /boot full 100% dan apt tidak dapat digunakan

NOTE: this is only if you can’t use apt to clean up due to a 100% full /boot

1. Get the list of kernel images

Get the list of kernel images and determine what you can do without. This command will show installed kernels except the currently running one

$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`

You will get the list of images somethign like below:

linux-image-3.19.0-25-generic
linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic
linux-image-extra-3.19.0-25-generic
linux-image-extra-3.19.0-56-generic
linux-image-extra-3.19.0-58-generic
linux-image-extra-3.19.0-59-generic
linux-image-extra-3.19.0-61-generic

2. Prepare Delete

Craft a command to delete all files in /boot for kernels that don’t matter to you using brace expansion to keep you sane. Remember to exclude the current and two newest kernel images. From above Example, it’s

sudo rm -rf /boot/*-3.19.0-{25,56,58,59,61,65}-*

3. Clean up what’s making apt grumpy about a partial install.

sudo apt-get -f install

4. Autoremove

Finally, autoremove to clear out the old kernel image packages that have been orphaned by the manual boot clean.

sudo apt-get autoremove

5. Update Grub

sudo update-grub

6. Now you can update, install packages

sudo apt-get update

Sumber : https://gist.github.com/ipbastola/2760cfc28be62a5ee10036851c654600

Post Revisions:

Changes:

August 20, 2018 @ 09:37:56Current Revision
Content
 

Kaskus I : Partisi /boot belum full 100% dan apt dapat digunakan

 

Kaskus I : Partisi /boot belum full 100% dan apt dapat digunakan

 
<h3>1. Check the current kernel version</h3>   <h3>1. Check the current kernel version</h3>
<pre><code>$ uname -r   <pre><code>$ uname -r
</code></pre>   </code></pre>
It will shows the list like below:   It will shows the list like below:
<pre><code>3.19.0-64-generic   <pre><code>3.19.0-64-generic
</code></pre>   </code></pre>
<h3><a id="user-content- 2-remove-the- old-kernels" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2- remove-the-old-kernels" aria-hidden=" true"></a>2. Remove the OLD kernels</h3>   <h3><a id="user-content- 2-remove-the- old-kernels" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2- remove-the-old-kernels" aria-hidden=" true"></a>2. Remove the OLD kernels</h3>
<h4><a id="user-content- 2a-list-the-old-kernel" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2a- list-the-old-kernel" aria-hidden=" true"></a>2.a. List the old kernel</h4>   <h4><a id="user-content- 2a-list-the-old-kernel" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2a- list-the-old-kernel" aria-hidden=" true"></a>2.a. List the old kernel</h4>
<pre><code>$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`   <pre><code>$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
</code></pre>   </code></pre>
You will get the list of images something like below:   You will get the list of images something like below:
<pre><code>linux- image-3.19.0-25-generic   <pre><code>linux- image-3.19.0-25-generic
linux-image-3.19.0-56-generic   linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic   linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic   linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic   linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic   linux-image-3.19.0-65-generic
linux-image-extra- 3.19.0-25-generic   linux-image-extra- 3.19.0-25-generic
linux-image-extra- 3.19.0-56-generic   linux-image-extra- 3.19.0-56-generic
linux-image-extra- 3.19.0-58-generic   linux-image-extra- 3.19.0-58-generic
linux-image-extra- 3.19.0-59-generic   linux-image-extra- 3.19.0-59-generic
linux-image-extra- 3.19.0-61-generic   linux-image-extra- 3.19.0-61-generic
</code></pre>   </code></pre>
<h4><a id="user-content- 2b-now-its-time-to-remove- old-kernel-one-by-one-as" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2b- now-its-time- to-remove-old- kernel-one-by-one-as" aria-hidden=" true"></a>2.b. Now its time to remove old kernel one by one as</h4>   <h4><a id="user-content- 2b-now-its-time-to-remove- old-kernel-one-by-one-as" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2b- now-its-time- to-remove-old- kernel-one-by-one-as" aria-hidden=" true"></a>2.b. Now its time to remove old kernel one by one as</h4>
<pre><code>$ sudo apt-get purge linux-image-3.19.0-25-generic   <pre><code>$ sudo apt-get purge linux-image-3.19.0-25-generic
$ sudo apt-get purge linux-image-3.19.0-56-generic   $ sudo apt-get purge linux-image-3.19.0-56-generic
$ sudo apt-get purge linux-image-3.19.0-58-generic   $ sudo apt-get purge linux-image-3.19.0-58-generic
$ sudo apt-get purge linux-image-3.19.0-59-generic   $ sudo apt-get purge linux-image-3.19.0-59-generic
$ sudo apt-get purge linux-image-3.19.0-61-generic   $ sudo apt-get purge linux-image-3.19.0-61-generic
$ sudo apt-get purge linux-image-3.19.0-65-generic   $ sudo apt-get purge linux-image-3.19.0-65-generic
</code></pre>   </code></pre>
When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:   When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:
<pre><code>$ sudo apt-get autoremove   <pre><code>$ sudo apt-get autoremove
</code></pre>   </code></pre>
And finally you can run this to update grub kernel list:   And finally you can run this to update grub kernel list:
<pre><code>$ sudo update-grub</code></pre>   <pre><code>$ sudo update-grub</code></pre>
 [/av_textblock]
 
<h3>1. Check the current kernel version</h3>   <h3>1. Check the current kernel version</h3>
<pre><code>$ uname -r   <pre><code>$ uname -r
</code></pre>   </code></pre>
It will shows the list like below:   It will shows the list like below:
<pre><code>3.19.0-64-generic   <pre><code>3.19.0-64-generic
</code></pre>   </code></pre>
<h3><a id="user-content- 2-remove-the- old-kernels" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2- remove-the-old-kernels" aria-hidden=" true"></a>2. Remove the OLD kernels</h3>   <h3><a id="user-content- 2-remove-the- old-kernels" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2- remove-the-old-kernels" aria-hidden=" true"></a>2. Remove the OLD kernels</h3>
<h4><a id="user-content- 2a-list-the-old-kernel" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2a- list-the-old-kernel" aria-hidden=" true"></a>2.a. List the old kernel</h4>   <h4><a id="user-content- 2a-list-the-old-kernel" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2a- list-the-old-kernel" aria-hidden=" true"></a>2.a. List the old kernel</h4>
<pre><code>$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`   <pre><code>$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
</code></pre>   </code></pre>
You will get the list of images something like below:   You will get the list of images something like below:
<pre><code>linux- image-3.19.0-25-generic   <pre><code>linux- image-3.19.0-25-generic
linux-image-3.19.0-56-generic   linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic   linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic   linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic   linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic   linux-image-3.19.0-65-generic
linux-image-extra- 3.19.0-25-generic   linux-image-extra- 3.19.0-25-generic
linux-image-extra- 3.19.0-56-generic   linux-image-extra- 3.19.0-56-generic
linux-image-extra- 3.19.0-58-generic   linux-image-extra- 3.19.0-58-generic
linux-image-extra- 3.19.0-59-generic   linux-image-extra- 3.19.0-59-generic
linux-image-extra- 3.19.0-61-generic   linux-image-extra- 3.19.0-61-generic
</code></pre>   </code></pre>
<h4><a id="user-content- 2b-now-its-time-to-remove- old-kernel-one-by-one-as" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2b- now-its-time- to-remove-old- kernel-one-by-one-as" aria-hidden=" true"></a>2.b. Now its time to remove old kernel one by one as</h4>   <h4><a id="user-content- 2b-now-its-time-to-remove- old-kernel-one-by-one-as" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2b- now-its-time- to-remove-old- kernel-one-by-one-as" aria-hidden=" true"></a>2.b. Now its time to remove old kernel one by one as</h4>
<pre><code>$ sudo apt-get purge linux-image-3.19.0-25-generic   <pre><code>$ sudo apt-get purge linux-image-3.19.0-25-generic
$ sudo apt-get purge linux-image-3.19.0-56-generic   $ sudo apt-get purge linux-image-3.19.0-56-generic
$ sudo apt-get purge linux-image-3.19.0-58-generic   $ sudo apt-get purge linux-image-3.19.0-58-generic
$ sudo apt-get purge linux-image-3.19.0-59-generic   $ sudo apt-get purge linux-image-3.19.0-59-generic
$ sudo apt-get purge linux-image-3.19.0-61-generic   $ sudo apt-get purge linux-image-3.19.0-61-generic
$ sudo apt-get purge linux-image-3.19.0-65-generic   $ sudo apt-get purge linux-image-3.19.0-65-generic
</code></pre>   </code></pre>
When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:   When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:
<pre><code>$ sudo apt-get autoremove   <pre><code>$ sudo apt-get autoremove
</code></pre>   </code></pre>
And finally you can run this to update grub kernel list:   And finally you can run this to update grub kernel list:
<pre><code>$ sudo update-grub</code></pre>   <pre><code>$ sudo update-grub</code></pre>
 [/av_textblock]
  
[/av_one_full]
 

Kaskus II : Partisi /boot full 100% dan apt tidak dapat digunakan

 

Kaskus II : Partisi /boot full 100% dan apt tidak dapat digunakan

 
<strong>NOTE: this is only if you can't use apt to clean up due to a 100% full /boot</strong>   <strong>NOTE: this is only if you can't use apt to clean up due to a 100% full /boot</strong>
<h3><a id="user-content- 1-get-the-list- of-kernel-images" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#1- get-the-list- of-kernel-images" aria-hidden=" true"></a>1. Get the list of kernel images</h3>   <h3><a id="user-content- 1-get-the-list- of-kernel-images" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#1- get-the-list- of-kernel-images" aria-hidden=" true"></a>1. Get the list of kernel images</h3>
Get the list of kernel images and determine what you can do without. This command will show installed kernels except the currently running one   Get the list of kernel images and determine what you can do without. This command will show installed kernels except the currently running one
<pre><code>$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`   <pre><code>$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
</code></pre>   </code></pre>
You will get the list of images somethign like below:   You will get the list of images somethign like below:
<pre><code>linux- image-3.19.0-25-generic   <pre><code>linux- image-3.19.0-25-generic
linux-image-3.19.0-56-generic   linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic   linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic   linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic   linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic   linux-image-3.19.0-65-generic
linux-image-extra- 3.19.0-25-generic   linux-image-extra- 3.19.0-25-generic
linux-image-extra- 3.19.0-56-generic   linux-image-extra- 3.19.0-56-generic
linux-image-extra- 3.19.0-58-generic   linux-image-extra- 3.19.0-58-generic
linux-image-extra- 3.19.0-59-generic   linux-image-extra- 3.19.0-59-generic
linux-image-extra- 3.19.0-61-generic   linux-image-extra- 3.19.0-61-generic
</code></pre>   </code></pre>
<h3><a id="user-content- 2-prepare-delete" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2- prepare-delete" aria-hidden=" true"></a>2. Prepare Delete</h3>   <h3><a id="user-content- 2-prepare-delete" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#2- prepare-delete" aria-hidden=" true"></a>2. Prepare Delete</h3>
Craft a command to delete all files in /boot for kernels that don't matter to you using brace expansion to keep you sane. Remember to exclude the current and two newest kernel images. From above Example, it's   Craft a command to delete all files in /boot for kernels that don't matter to you using brace expansion to keep you sane. Remember to exclude the current and two newest kernel images. From above Example, it's
<pre><code>sudo rm -rf /boot/*-3.19.0- {25,56,58,59,61,65}-*   <pre><code>sudo rm -rf /boot/*-3.19.0- {25,56,58,59,61,65}-*
</code></pre>   </code></pre>
<h3><a id="user-content- 3-clean-up-whats-making-apt- grumpy-about- a-partial-install" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#3- clean-up-whats-making-apt- grumpy-about- a-partial-install" aria-hidden=" true"></a>3. Clean up what's making apt grumpy about a partial install.</h3>   <h3><a id="user-content- 3-clean-up-whats-making-apt- grumpy-about- a-partial-install" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#3- clean-up-whats-making-apt- grumpy-about- a-partial-install" aria-hidden=" true"></a>3. Clean up what's making apt grumpy about a partial install.</h3>
<pre><code>sudo apt-get -f install   <pre><code>sudo apt-get -f install
</code></pre>   </code></pre>
<h3><a id="user-content- 4-autoremove" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#4-autoremove" aria-hidden=" true"></a>4. Autoremove</h3>   <h3><a id="user-content- 4-autoremove" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#4-autoremove" aria-hidden=" true"></a>4. Autoremove</h3>
Finally, autoremove to clear out the old kernel image packages that have been orphaned by the manual boot clean.   Finally, autoremove to clear out the old kernel image packages that have been orphaned by the manual boot clean.
<pre><code>sudo apt-get autoremove   <pre><code>sudo apt-get autoremove
</code></pre>   </code></pre>
<h3><a id="user-content- 5-update-grub" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#5- update-grub" aria-hidden=" true"></a>5. Update Grub</h3>   <h3><a id="user-content- 5-update-grub" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#5- update-grub" aria-hidden=" true"></a>5. Update Grub</h3>
<pre><code>sudo update-grub   <pre><code>sudo update-grub
</code></pre>   </code></pre>
<h3><a id="user-content- 6-now-you-can- update-install-packages" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#6- now-you-can-update- install-packages" aria-hidden=" true"></a>6. Now you can update, install packages</h3>   <h3><a id="user-content- 6-now-you-can- update-install-packages" class="anchor" href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600#6- now-you-can-update- install-packages" aria-hidden=" true"></a>6. Now you can update, install packages</h3>
<pre><code>sudo apt-get update</code></pre>   <pre><code>sudo apt-get update</code></pre>
 [/av_textblock]
  
[/av_one_full]
 
Sumber : https://gist.github.com/ ipbastola/2760cfc28be62a5ee10036851c654600   Sumber : <a href="https:/ /gist.github.com/ipbastola/ 2760cfc28be62a5ee10036851c654600">Klik disini</a>
 [/av_textblock]

Note: Spaces may be added to comparison text to allow better line wrapping.