How to free boot space. Nothing on this site has worked so far

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to free boot space. Nothing on this site has worked so far

L0 Member

expedition@Expedition:/$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 733M 0 733M 0% /dev
tmpfs 151M 16M 135M 11% /run
/dev/mapper/Expedition--vg-root 18G 7.6G 9.2G 46% /
tmpfs 755M 0 755M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 755M 0 755M 0% /sys/fs/cgroup
/dev/sda1 472M 471M 0 100% /boot
tmpfs 151M 0 151M 0% /run/user/1000

3 REPLIES 3

L4 Transporter

Hi @donlillard 

 

Thanks for reaching out.

 

Initial steps to free ubuntu space are:

 

1) Get rid of packages that are no longer required

sudo apt-get autoremove

 

2) Clean up APT cache in Ubuntu

sudo apt-get autoclean

 

Also you could check witch folders are taking more space by using the following command and removing those you do not require:

for i in `ls`; do du -hs $i; done 

 

Let me know if you have further questions,

Best regards,

David

Thank you for your reply. I saw those command to clean up and I've also seen accepted solution to go into /boot and remove old img files. However, none of the command run successfully. I cannot remove or clean up any files. Here are the results of these commands.

 

expedition@Expedition:~$ sudo apt-get autoremove
[sudo] password for expedition:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-image-generic : Depends: linux-image-4.4.0-210-generic but it is not installed or
linux-image-unsigned-4.4.0-210-generic but it is not installed
Recommends: thermald but it is not installed
linux-modules-extra-4.4.0-210-generic : Depends: linux-image-4.4.0-210-generic but it is not installed or
linux-image-unsigned-4.4.0-210-generic but it is not installed
E: Unmet dependencies. Try using -f.

 


expedition@Expedition:~$ sudo apt-get autoremove -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-4.4.0-210-generic
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following NEW packages will be installed:
linux-image-4.4.0-210-generic
0 upgraded, 1 newly installed, 0 to remove and 148 not upgraded.
8 not fully installed or removed.
Need to get 0 B/6,954 kB of archives.
After this operation, 7,255 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 375201 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-210-generic_4.4.0-210.242_amd64.deb ...
Unpacking linux-image-4.4.0-210-generic (4.4.0-210.242) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-210-generic_4.4.0-210.242_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.4.0-210-generic' to '/boot/vmlinuz-4.4.0-210-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.4.0-210-generic_4.4.0-210.242_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

expedition@Expedition:~$ sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done

 

L1 Bithead

I have this link in my notes for when /boot is full.
https://gist.github.com/ipbastola/2760cfc28be62a5ee10036851c654600


Here is what mine looks like:
expedition@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 17M 782M 3% /run
/dev/mapper/ubuntu--vg-root 23G 6.7G 16G 31% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/loop1 26M 26M 0 100% /snap/ruby/178
/dev/loop2 56M 56M 0 100% /snap/core18/2785
/dev/loop0 56M 56M 0 100% /snap/core18/2751
/dev/loop4 54M 54M 0 100% /snap/snapd/19361
/dev/loop3 54M 54M 0 100% /snap/snapd/19457
/dev/vda1 720M 110M 574M 17% /boot
tmpfs 799M 0 799M 0% /run/user/1000

 

expedition@ubuntu:~$ cd /boot


expedition@ubuntu:/boot$ ls -al
total 103992
drwxr-xr-x 4 root root 4096 Aug 24 2022 .
drwxr-xr-x 25 root root 4096 Oct 21 2022 ..
-rw-r--r-- 1 root root 191087 Jul 1 2020 config-4.4.0-186-generic
-rw-r--r-- 1 root root 191002 Apr 16 2021 config-4.4.0-210-generic
drwxr-xr-x 5 root root 4096 Aug 24 2022 grub
-rw-r--r-- 1 root root 41806895 Jul 10 2021 initrd.img-4.4.0-186-generic
-rw-r--r-- 1 root root 41829159 Aug 24 2022 initrd.img-4.4.0-210-generic
drwx------ 2 root root 16384 Jul 9 2021 lost+found
-rw------- 1 root root 3920886 Jul 1 2020 System.map-4.4.0-186-generic
-rw------- 1 root root 3925753 Apr 16 2021 System.map-4.4.0-210-generic
-rw------- 1 root root 7218016 Jul 6 2020 vmlinuz-4.4.0-186-generic
-rw------- 1 root root 7225568 Apr 17 2021 vmlinuz-4.4.0-210-generic

PCSNC #0182
  • 759 Views
  • 3 replies
  • 0 Likes
  • 77 Subscriptions
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!