Can't delete old linux kernel, no disc space

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I want do upgrade my system.



apt update



Then:



apt upgrade -y



And i got this error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


So i type this:



Suggested packages:
linux-doc-4.9 debian-kernel-handbook
The following NEW packages will be installed:
linux-image-4.9.0-5-amd64
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
48 not fully installed or removed.
Need to get 38.8 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security-cdn.debian.org stretch/updates/main amd64 linux-image-4.9.0-5-amd64 amd64 4.9.65-3+deb9u2 [38.8 MB]
Fetched 38.8 MB in 7s (4,995 kB/s)
(Reading database ... 142235 files and directories currently installed.)
Preparing to unpack .../linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb ...
Unpacking linux-image-4.9.0-5-amd64 (4.9.65-3+deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.9.0-5-amd64' to '/boot/vmlinuz-4.9.0-5-amd64.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


But got same error. I can't delete old kernels by this command:



dpkg --list | grep linux-image | awk ' print $2 ' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge


Because same error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).






share|improve this question


















  • 2




    Can you paste the output of df into your question? If your /boot is a tiny filesystem, this problem will recur even if you manually clean stuff up now. We can point you to instructions on how to expand the filesystem size.
    – Mark Plotnick
    Jan 15 at 16:38






  • 1




    Use apt autoremove to remove the old kernels then apt dist-upgrade
    – GAD3R
    Jan 15 at 16:44







  • 1




    i.stack.imgur.com/E6QCj.png can't apt auto remove apt autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    – aTastyCoookie
    Jan 15 at 16:48







  • 1




    Backup your /var/lib/dpkg/status file then edit the status file , remove the linux-image-4.9.0-5-amd64 with its description then dpkg --configure -a then remove the old kernels . Please processed carefully.
    – GAD3R
    Jan 15 at 16:57










  • Can't you remove some old kernels manually from /boot? That should permit installing 4.9.0-5. But don't remove anything you might still need.
    – Gerard H. Pille
    Jan 15 at 18:39














up vote
1
down vote

favorite












I want do upgrade my system.



apt update



Then:



apt upgrade -y



And i got this error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


So i type this:



Suggested packages:
linux-doc-4.9 debian-kernel-handbook
The following NEW packages will be installed:
linux-image-4.9.0-5-amd64
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
48 not fully installed or removed.
Need to get 38.8 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security-cdn.debian.org stretch/updates/main amd64 linux-image-4.9.0-5-amd64 amd64 4.9.65-3+deb9u2 [38.8 MB]
Fetched 38.8 MB in 7s (4,995 kB/s)
(Reading database ... 142235 files and directories currently installed.)
Preparing to unpack .../linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb ...
Unpacking linux-image-4.9.0-5-amd64 (4.9.65-3+deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.9.0-5-amd64' to '/boot/vmlinuz-4.9.0-5-amd64.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


But got same error. I can't delete old kernels by this command:



dpkg --list | grep linux-image | awk ' print $2 ' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge


Because same error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).






share|improve this question


















  • 2




    Can you paste the output of df into your question? If your /boot is a tiny filesystem, this problem will recur even if you manually clean stuff up now. We can point you to instructions on how to expand the filesystem size.
    – Mark Plotnick
    Jan 15 at 16:38






  • 1




    Use apt autoremove to remove the old kernels then apt dist-upgrade
    – GAD3R
    Jan 15 at 16:44







  • 1




    i.stack.imgur.com/E6QCj.png can't apt auto remove apt autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    – aTastyCoookie
    Jan 15 at 16:48







  • 1




    Backup your /var/lib/dpkg/status file then edit the status file , remove the linux-image-4.9.0-5-amd64 with its description then dpkg --configure -a then remove the old kernels . Please processed carefully.
    – GAD3R
    Jan 15 at 16:57










  • Can't you remove some old kernels manually from /boot? That should permit installing 4.9.0-5. But don't remove anything you might still need.
    – Gerard H. Pille
    Jan 15 at 18:39












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I want do upgrade my system.



apt update



Then:



apt upgrade -y



And i got this error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


So i type this:



Suggested packages:
linux-doc-4.9 debian-kernel-handbook
The following NEW packages will be installed:
linux-image-4.9.0-5-amd64
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
48 not fully installed or removed.
Need to get 38.8 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security-cdn.debian.org stretch/updates/main amd64 linux-image-4.9.0-5-amd64 amd64 4.9.65-3+deb9u2 [38.8 MB]
Fetched 38.8 MB in 7s (4,995 kB/s)
(Reading database ... 142235 files and directories currently installed.)
Preparing to unpack .../linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb ...
Unpacking linux-image-4.9.0-5-amd64 (4.9.65-3+deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.9.0-5-amd64' to '/boot/vmlinuz-4.9.0-5-amd64.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


But got same error. I can't delete old kernels by this command:



dpkg --list | grep linux-image | awk ' print $2 ' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge


Because same error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).






share|improve this question














I want do upgrade my system.



apt update



Then:



apt upgrade -y



And i got this error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


So i type this:



Suggested packages:
linux-doc-4.9 debian-kernel-handbook
The following NEW packages will be installed:
linux-image-4.9.0-5-amd64
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
48 not fully installed or removed.
Need to get 38.8 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security-cdn.debian.org stretch/updates/main amd64 linux-image-4.9.0-5-amd64 amd64 4.9.65-3+deb9u2 [38.8 MB]
Fetched 38.8 MB in 7s (4,995 kB/s)
(Reading database ... 142235 files and directories currently installed.)
Preparing to unpack .../linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb ...
Unpacking linux-image-4.9.0-5-amd64 (4.9.65-3+deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.9.0-5-amd64' to '/boot/vmlinuz-4.9.0-5-amd64.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


But got same error. I can't delete old kernels by this command:



dpkg --list | grep linux-image | awk ' print $2 ' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge


Because same error:



Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).








share|improve this question













share|improve this question




share|improve this question








edited Jan 15 at 17:41









Jeff Schaller

31.8k848109




31.8k848109










asked Jan 15 at 16:33









aTastyCoookie

61




61







  • 2




    Can you paste the output of df into your question? If your /boot is a tiny filesystem, this problem will recur even if you manually clean stuff up now. We can point you to instructions on how to expand the filesystem size.
    – Mark Plotnick
    Jan 15 at 16:38






  • 1




    Use apt autoremove to remove the old kernels then apt dist-upgrade
    – GAD3R
    Jan 15 at 16:44







  • 1




    i.stack.imgur.com/E6QCj.png can't apt auto remove apt autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    – aTastyCoookie
    Jan 15 at 16:48







  • 1




    Backup your /var/lib/dpkg/status file then edit the status file , remove the linux-image-4.9.0-5-amd64 with its description then dpkg --configure -a then remove the old kernels . Please processed carefully.
    – GAD3R
    Jan 15 at 16:57










  • Can't you remove some old kernels manually from /boot? That should permit installing 4.9.0-5. But don't remove anything you might still need.
    – Gerard H. Pille
    Jan 15 at 18:39












  • 2




    Can you paste the output of df into your question? If your /boot is a tiny filesystem, this problem will recur even if you manually clean stuff up now. We can point you to instructions on how to expand the filesystem size.
    – Mark Plotnick
    Jan 15 at 16:38






  • 1




    Use apt autoremove to remove the old kernels then apt dist-upgrade
    – GAD3R
    Jan 15 at 16:44







  • 1




    i.stack.imgur.com/E6QCj.png can't apt auto remove apt autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    – aTastyCoookie
    Jan 15 at 16:48







  • 1




    Backup your /var/lib/dpkg/status file then edit the status file , remove the linux-image-4.9.0-5-amd64 with its description then dpkg --configure -a then remove the old kernels . Please processed carefully.
    – GAD3R
    Jan 15 at 16:57










  • Can't you remove some old kernels manually from /boot? That should permit installing 4.9.0-5. But don't remove anything you might still need.
    – Gerard H. Pille
    Jan 15 at 18:39







2




2




Can you paste the output of df into your question? If your /boot is a tiny filesystem, this problem will recur even if you manually clean stuff up now. We can point you to instructions on how to expand the filesystem size.
– Mark Plotnick
Jan 15 at 16:38




Can you paste the output of df into your question? If your /boot is a tiny filesystem, this problem will recur even if you manually clean stuff up now. We can point you to instructions on how to expand the filesystem size.
– Mark Plotnick
Jan 15 at 16:38




1




1




Use apt autoremove to remove the old kernels then apt dist-upgrade
– GAD3R
Jan 15 at 16:44





Use apt autoremove to remove the old kernels then apt dist-upgrade
– GAD3R
Jan 15 at 16:44





1




1




i.stack.imgur.com/E6QCj.png can't apt auto remove apt autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
– aTastyCoookie
Jan 15 at 16:48





i.stack.imgur.com/E6QCj.png can't apt auto remove apt autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: linux-image-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
– aTastyCoookie
Jan 15 at 16:48





1




1




Backup your /var/lib/dpkg/status file then edit the status file , remove the linux-image-4.9.0-5-amd64 with its description then dpkg --configure -a then remove the old kernels . Please processed carefully.
– GAD3R
Jan 15 at 16:57




Backup your /var/lib/dpkg/status file then edit the status file , remove the linux-image-4.9.0-5-amd64 with its description then dpkg --configure -a then remove the old kernels . Please processed carefully.
– GAD3R
Jan 15 at 16:57












Can't you remove some old kernels manually from /boot? That should permit installing 4.9.0-5. But don't remove anything you might still need.
– Gerard H. Pille
Jan 15 at 18:39




Can't you remove some old kernels manually from /boot? That should permit installing 4.9.0-5. But don't remove anything you might still need.
– Gerard H. Pille
Jan 15 at 18:39















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f417283%2fcant-delete-old-linux-kernel-no-disc-space%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f417283%2fcant-delete-old-linux-kernel-no-disc-space%23new-answer', 'question_page');

);

Post as a guest