By "Head Unit" I assume you are referring to the cylinder head. I am currently trying to remove mine due to a burnt exhaust valve, which I will have ground and surfaced at a local machine shop. As this procedure is not something anyone with a life would try to describe by writing down in this format, I'd suggest you buy the appropriate manual for your make and model (Haynes is good) and go from there. Why are you removing the head? This is not a simple job, so the fact that you even asked the question implies that you don't really know what you are getting into. Good luck. Zaphod Beeblebrox Zaphod above obviously hasn't a clue, I'd say the person who asked the question knows exactly what he's getting into as what he actually wants to do is remove the stereo which is commonly known in the audio industry as a 'Head Unit'
Here's the answer http://www.scoobymods.com/forums/showthread.php?t=5537
The 2005 Subaru Legacy has 39.5 in. of front head room.
The 2008 Subaru Legacy has 36.5 in. of rear head room.
The 2002 Subaru Legacy has 38.9 in. of front head room.
The 2010 Subaru Legacy has 37.5 in. of rear head room.
The 2011 Subaru Legacy has 40.3 in. of front head room.
The 2009 Subaru Legacy has 39.5 in. of front head room.
The 2007 Subaru Legacy has 36.5 in. of rear head room.
The 2004 Subaru Legacy has 36.6 in. of rear head room.
The 2014 Subaru Legacy has 40.3 in. of front head room.
The 2006 Subaru Legacy has 39.5 in. of front head room.
The 2008 Subaru Legacy has 39.5 in. of front head room.
The 2001 Subaru Legacy has 36.6 in. of rear head room.