Come soluzione a un altro problema sono stato costretto a usare dpkg --remove
per disinstallare un pacchetto. Tuttavia, dopo averlo fatto, il pacchetto è ancora elencato in dpkg -l
:
[email protected]:/boot$ dpkg -l | grep linux-image-2
ii linux-image-2.6.32-30-server 2.6.32-30.59 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-31-server 2.6.32-31.61 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-32-server 2.6.32-32.62 Linux kernel image for version 2.6.32 on x86
[email protected]:/boot$ sudo dpkg --remove linux-image-2.6.32-30-server
(Reading database ... 141902 files and directories currently installed.)
Removing linux-image-2.6.32-30-server ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
[...]
done
[email protected]:/boot$ dpkg -l | grep linux-image-2
rc linux-image-2.6.32-30-server 2.6.32-30.59 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-31-server 2.6.32-31.61 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-32-server 2.6.32-32.62 Linux kernel image for version 2.6.32 on x86
[email protected]:/boot$ sudo apt-get --purge remove linux-image-2.6.32-30-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-image-2.6.32-30-server is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Come posso "pulire casa" in modo che dpkg-l
non elenca più questi pacchetti più vecchi e inesistenti?
Risposta accettata:
Corri
sudo dpkg --purge <package>
o
sudo apt-get purge <package>
per disinstallare