[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: removing old kernel packages



Brian Servis wrote:

> *- On 23 Apr, Aaron M. Stromas wrote about "removing old kernel packages"
> >
> > hi,
> >
> > i upgraded my kernel from 2.0.34 to 2.0.36. then, using dpkg -r,  i went
> > to remove kernel-[image|source]-2.0.34 but it complained about
> > /lib/modules/2.0.34 and a number of directories under
> > /usr/source/kernel-source-2.0.34 not being empty an didn't remove them.
> >
> > i'm tempted to remove those manually (or should i use dpkg --purge?) but
> > something warns me that i may regret doing this later.
> >
> > why dpkg behaves that way and how can i get rid of 2.0.34 stuff? i
> > intend to install kernel-source-2.0.36 (kernel-image-2.0.36 is obvously
> > already installed). tia,
> >
>
> --remove removes all non configuration files.(leaves
>          files in /var/lib/dpkg/info/<pkgname>.conffiles
> --purge removes all files. (everything in
>         /var/lib/dpkg/info/<pkgname>.list
>
> However if there are any files in the directories that it is trying to
> remove that are not in /var/lib/dpkg/info/<pkgname.list> then you will
> still get the 'not empty directories' complaints.  dpkg will not remove
> files that it does not know about.  In a /lib/modules/* directory this
> is probably the modules.dep file that is generated by depmod -a after
> the modules have been installed.
>

i  ran dpkg --purge kernel-source-2.0.34 and it looked it did.

mortirolo:# dpkg --purge kernel-source-2.0.34
(Reading database ... 28636 files and directories currently installed.)
Removing kernel-source-2.0.34 ...
Purging configuration files for kernel-source-2.0.34 ...

i was happy. later i looked in /usr/src and here they were:

mortirolo:# ls -l /usr/src/
total 2
drwxr-xr-x   6 root     root         1024 Apr 16 00:12 kernel-source-2.0.34
lrwxrwxrwx   1 root     root           21 Feb 11 06:17 linux ->
kernel-source-2.0.34/
lrwxrwxrwx   1 root     root           20 Feb 11 05:37 linux-2.0.34 ->
kernel-source-2.0.34
drwxr-sr-x   2 root     root         1024 Feb 25 05:05 modules

mortirolo:# ls /lib/modules/
2.0.34  2.0.36

mortirolo:# dpkg -S /usr/src/kernel-source-2.0.34
dpkg: /usr/src/kernel-source-2.0.34 not found.

dpkg removed all the traces of the kernel=source-2.0.34 from its database, so
should i just remove the vestiges of the 2.0.34 manually? btw, the only
modules.dep is in /lib/modules/2.0.36. any other reasons why dpkg tries to
cheat me? tia,

-a

>
> --
> Brian
> ---------------------------------------------------------------------
> "Never criticize anybody until you have walked a mile in their shoes,
>  because by that time you will be a mile away and have their shoes."
>                                                            - unknown
>
> Mechanical Engineering                                bservis@usa.net
> Purdue University                  http://www.ecn.purdue.edu/~servis
> ---------------------------------------------------------------------

--
Aaron Stromas    | "Tick-tick-tick!!!... ja, Pantani is weg..."
Oracle Corp      |                             BRTN commentator
+1 703.708.49.33 |                              L'Alpe d'Huez
                                            1995 Tour de France




Reply to: