On 23/08/18 12:30, Ralph Corderoy wrote:
Hi Peter,

Yes, they're kernels and you only typically need the last two or
three working ones.
https://help.ubuntu.com/community/RemoveOldKernels might free quite
a bit of space.
That link suggests the command
     sudo apt-get autoremove --purge

Periodically when I add something I get prompted to
     sudo apt-get autoremove
which I do.
So the same but without the `--purge'.

Yesterday I did
     sudo apt autoremove
which did something, but didn't remove them.  Well maybe it did
because  the above command says nothing to do.
It did.  It removed, but didn't purge, the packages that were
automatically installed, `apt-mark showauto', and no longer have
anything depending on them;  that was the original reason they were
installed.

Interesting, they are still there.  A sample:
linux-signed-image-4.4.0-77-generic 4.4.0-77.98 deinstall ok config-files
linux-signed-image-4.4.0-78-generic 4.4.0-78.99 deinstall ok config-files
linux-signed-image-4.4.0-79-generic 4.4.0-79.100 deinstall ok config-files
No, they've been removed.  The `deinstall ok' means you have selected
them to be de-installed and that went well.  The `config-files' says the
package's configuration files, e.g. things in /etc, remain.  That's
because you didn't purge the packages, just removed them.

You can still try to purge those configuration files IIRC.

     sudo -i apt-get purge linux-signed-image-4.4.0-77-generic

For a list of packages that only have their configuration installed:

     aptitude search '~c'

The reason `remove' leaves behind the configuration files is in case
you've tailored them and then decide to re-install the package next
week;  you'd retain your settings from before, though have the package's
own ones installed alongside with some suffix.  (I forget what, not
using APT-based systems much anymore.)  If you didn't tailor them, it
still leaves them behind.  That seems odd behaviour to me.

Cheers, Ralph.

peterm@peterm-MBB-34204H:~$     sudo -i apt-get purge linux-signed-image-4.4.0-77-generic
[sudo] password for peterm:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
  linux-signed-image-4.4.0-77-generic*
0 to upgrade, 0 to newly install, 1 to remove and 1 not to upgrade.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 298891 files and directories currently installed.)
Purging configuration files for linux-signed-image-4.4.0-77-generic (4.4.0-77.98) ...
peterm@peterm-MBB-34204H:~$


Now to work through the rest of them, being careful not to remove the current ones.

Peter


--
Next meeting:  Bournemouth, Tuesday, 2018-09-04 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to