Cleaning past installs

Stephen M. Webb stephen.webb at canonical.com
Sun Apr 5 21:14:17 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15-04-05 11:40 AM, William Frick wrote:
> I can't find the original source but I recall there was a simple command to remove old kernels etcetera so they
> don't get picked up by grub as boot options.  Also as a housekeeping measure prior to upgrading to the latest
> (15.04) when the time comes.
> 
> I recall it was something like sudo apt-get clean .....
> 
> Suggestions anyone ?

"sudo apt-get autoremove --purge"

This will remove all old kernels except for the current and the previous current, as well as any other old unnecessary
packages.  It removes them and all their related files so you get the disk space back.

I run that command after every dist-upgrade that installs a new kernel (which on the -dev version of Ubuntu is about
once a week).  I have never run into trouble.


- -- 
Stephen M. Webb  <stephen at ubuntu.com>
https://launchpad.net/~bregma
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlUhpagACgkQTLRKqWcl7vOIAwCghPb3iXn13LJ8sGsvM91TDs3E
a/oAoJtiacesJRfmYqI/ikGOVaTY7Hed
=XjBM
-----END PGP SIGNATURE-----



More information about the ubuntu-ca mailing list