Is it safe to remove old kernels after installing the latest mainline?

Yes it's safe to remove kernels you don't use. However I would check this question first for other recommended ways to remove old kernels:


Use Computer Janitor!

The easy way to do this using the Ubuntu Tweak that have Computer Janitor.

enter image description here

Install

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Hm, I would leave 1 or 2 kernels in the installed systems. It is almost not possible, but it could be that by update the newest kernel gets malformed. So it would be possible to return then via the next installed kernel into system.

I only say this not because of Ubuntu, but of else distributions, where sometimes updates malformed the installation somehow. Ubuntu is quite secure and quite reliable with updating files. It belongs only to the circumspectly user or admin, to allow himself an additional emergency-mode for his system, besides the protected-mode.