Old kernel source and objects on server?

[root@bilumtest:/var]# rpm -a -q | grep kernel | grep -i source
kernel-source-4.4.114-92.64.1.noarch
kernel-source-4.4.103-92.56.1.noarch

[root@bilumtest:/usr/src]# ls -alF
total 0
drwxr-xr-x 1 root root 632 Feb 23 13:04 ./
drwxr-xr-x 1 root root 130 Jul 10 2017 …/
drwxr-xr-x 1 root root 394 Sep 19 2016 linux-3.12.62-60.62/
drwxr-xr-x 1 root root 12 Sep 19 2016 linux-3.12.62-60.62-obj/
drwxr-xr-x 1 root root 324 May 5 2017 linux-3.12.69-60.64.32/
drwxr-xr-x 1 root root 448 Jan 16 09:59 linux-4.4.103-92.56/
drwxr-xr-x 1 root root 12 Jan 16 09:59 linux-4.4.103-92.56-obj/
drwxr-xr-x 1 root root 448 Feb 23 12:41 linux-4.4.114-92.64/
drwxr-xr-x 1 root root 12 Feb 23 12:41 linux-4.4.114-92.64-obj/
drwxr-xr-x 1 root root 378 Aug 9 2017 linux-4.4.59-92.20/
drwxr-xr-x 1 root root 12 Jun 23 2017 linux-4.4.59-92.20-obj/
drwxr-xr-x 1 root root 448 Jul 25 2017 linux-4.4.74-92.29/
drwxr-xr-x 1 root root 12 Jul 25 2017 linux-4.4.74-92.29-obj/
drwxr-xr-x 1 root root 448 Aug 28 2017 linux-4.4.74-92.35/
drwxr-xr-x 1 root root 12 Aug 28 2017 linux-4.4.74-92.35-obj/
drwxr-xr-x 1 root root 448 Sep 18 15:07 linux-4.4.74-92.38/
drwxr-xr-x 1 root root 12 Sep 18 15:07 linux-4.4.74-92.38-obj/
drwxr-xr-x 1 root root 70 Sep 21 2014 packages/

[root@bilumtest:/usr/src]# rpm -q -f linux-*/README
file /usr/src/linux-3.12.62-60.62/README is not owned by any package
file /usr/src/linux-3.12.69-60.64.32/README is not owned by any package
kernel-source-4.4.103-92.56.1.noarch
kernel-source-4.4.114-92.64.1.noarch
file /usr/src/linux-4.4.59-92.20/README is not owned by any package
file /usr/src/linux-4.4.74-92.29/README is not owned by any package
file /usr/src/linux-4.4.74-92.35/README is not owned by any package
file /usr/src/linux-4.4.74-92.38/README is not owned by any package

It is safe to remove the directories that are no longer owned by any installed package?

Thanks,
Matt

Yes; the source is not required by default at all, so unless you are
building from it you can probably get rid of those kernel directories.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

I sort of thought that just wanted to see if anyone else agreed!

Thanks! :slight_smile: