0

Over the last six months, linux-hwe-5.4-headers-5-4-0-xx haven't been deleted from usr-->src directory. Earlier from the current versions, v42 to v62 are still available.

Will there be any problem if I delete them manually? Ubuntu 18.04.

And, is there any explanation why this happened? System has been operating for over 18 months, but this started about 6 months ago.

enter image description here

user3169
  • 382
  • 1
  • 4
  • 16
  • 3
    Have you tried sudo apt autoremove – Charles Green Mar 12 '21 at 03:46
  • @CharlesGreen I suppose, but I only want to remove obsolete files in this directory. I just want to confirm they have no involvement with the currently loaded system. – user3169 Mar 12 '21 at 04:34
  • Ah. As long as the files are not related to the currently loaded kernel, or one that you may want to run. What about the parts in /usr/lib/modules, or /boot, or /usr/share/doc? – Charles Green Mar 12 '21 at 06:35
  • @CharlesGreen Thanks. Older kernels are only in usr/share/doc, but only 2 files each. The reason I want to delete the mentioned files is that the file count (about 200,000 files) made a backup by Timeshift unreasonable. So I only need to know if any impact of deleting them exists. – user3169 Mar 12 '21 at 19:56
  • That's odd, that only some of the kernel files are being retained. – Charles Green Mar 12 '21 at 21:32
  • Most of the references I can find to this recommend the use of apt purge to help remove the older files and ensure that nothing is hooked to - sort of a apt list *linux* | grep installed and then sudo apt purge linux-headers-3.8.1... kind of loop. Myself, an occasional sudo apt autoremove --purge seems to keep things happy. – Charles Green Mar 12 '21 at 21:36
  • @CharlesGreen Sounds good. Today, Software Update popped up, and I noticed hwe headers are not listed under "Unused kernal updates to be removed", so I guess it is by design, or something else changed. – user3169 Mar 13 '21 at 18:54
  • @CharlesGreen Anyway sudo apt autoremove worked ok and removed those files. It's kind of basic and maybe I should have done some research, but If you'd care to write an answer with some details, I'll accept it. – user3169 Mar 15 '21 at 05:46
  • There's several very good answers on removing old kernel files - primarily written at people who have filled their root partitions to the point of not functioning. I'll point this at one of those, as being basically the same issue. I'm curious why you're using timeshift to backup the system files however, as they are generally easier for me to reinstall, than to restore and reconfigure. – Charles Green Mar 15 '21 at 06:37

0 Answers0