DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was checking out some directories I don't usually access in my Debian system and came across the /boot directory. When I go to this dir, I can see: screenshot.
or
Code:
login as: carlos
Using keyboard-interactive authentication.
Password:
Linux stricom 2.6.14-2-k7 #1 Sat Nov 26 14:04:05 UTC 2005 i686 GNU/Linux
Welcome to the Stricom Linux server. All actions | commands | history is monitored by the linux administrator.
Last login: Wed Nov 30 12:07:04 2005 from .mil
carlos@stricom:~$ cd /boot/
carlos@stricom:/boot$ ls
config-2.6.14-2-k7 initrd.img-2.6.14-2-k7 System.map-2.6.8-2-386
config-2.6.8-2-386 initrd.img-2.6.8-2-386 vmlinuz-2.6.14-2-k7
grub System.map-2.6.14-2-k7 vmlinuz-2.6.8-2-386
My question is wondering if I am able to clean some of this up? The new kernel I downloaded and installed 2.6.14-2-k7 is fine. What can I remove from this /boot/ dir?
Last edited by carlosinfl; 11-30-2005 at 12:09 PM.
You could remove your old 2.6.8 kernel files if you won't ever be using these again. You'll probably only save 6-7Mb however. If you delete the old kernel you might want to go to your grub subdirectory, edit menu.lst, and remove the sections that point to the removed kernel as well. Won't hurt to leave the old grub references in place, but they won't work after you remove the kernel so some cleanup would be good.
Originally posted by dastrike ...It will remove anything related to the old kernel...
Now this seems so obvious I can't believe I've been manually doing things in the past! Does the apt-get command also remove stuff under /lib/modules etc? From your description, this sounds like what will happen. I would have to admit - much simpler and better than manual removal!
Yes. All the files provided by the package (except certain configuration files) will be removed when you remove the package with apt-get (or dpkg). Using the --purge option removes even any configuration files provided with the package.
To see a list of the files provided with a certain package, execute
Code:
dpkg -L packagename
If you want to find out what package a certain file belongs to, execute
Originally posted by dastrike Yes. All the files provided by the package...
Thanks. I've used 'apt-get remove' often for other packages but for some reason it never clicked that I should do this to remove unused kernels. A short in the logic circuit of my brain I guess.
I would consider removing the entry from GRUB if it bothers you, but unless you're running low on space in a /boot partition (assuming it is in its own partition), is there really a good reason to remove the stable kernel? Seems to me that in this case "cleaning up" means cutting off a branch you might later want to stand on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.