Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1497  / 1 Year ago, sat, november 26, 2022, 8:51:41

I am using Ubuntu 12.04 LTS and whenever I use:



sudo apt-get remove
sudo apt-get install


it replies:



cp: failed to extend `/boot/initrd.img-3.5.0-47-generic.dpkg-bak': No space left on device
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)


Is this right?



Is it installing/removing?



The reply for:



sudo apt-get install -f 


is:



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.99ubuntu13.4) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
ln: failed to create hard link `/boot/initrd.img-3.5.0-47-generic.dpkg-bak' => `/boot/initrd.img-3.5.0-47-generic': Operation not permitted
cp: writing `/boot/initrd.img-3.5.0-47-generic.dpkg-bak': No space left on device
cp: failed to extend `/boot/initrd.img-3.5.0-47-generic.dpkg-bak': No space left on device
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

More From » apt

 Answers
2

Your errors said:




No space left on device




Open System Monitor from Dash and select the Filesystems tab.



enter image description here



And if the problem is only related to /boot partition try this:



sudo apt-get autoremove


If it didn't work then It seems you have no space in /boot



You've a lot unused kernels. Remove all but the last kernels with:



sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")

[#26638] Monday, November 28, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
epypian

Total Points: 130
Total Questions: 111
Total Answers: 113

Location: Romania
Member since Mon, Jun 6, 2022
2 Years ago
epypian questions
Sat, Jul 31, 21, 18:35, 3 Years ago
Sun, Oct 24, 21, 23:28, 3 Years ago
Sun, Dec 26, 21, 12:08, 2 Years ago
Tue, May 9, 23, 21:23, 1 Year ago
;