I sold a property in April 2010 that had been used as a rental property until the end of 2009. The property was listed on my schedule E as a rental in 2008 and 2009. It was my primary residence from 2004 until mid-2008 when it became a rental property. I believe I shouldn't have capital gains since the property was used as my primary residence for 2 out of the 5 years prior to sale. I didn't collect any rent in 2010 while the property was listed for sale. I understand I have to recapture the prior years' depreciation on a 4797 (I think) but can I also write off the utilities, insurance, taxes, mortgage interest, etc on schedule E with no rental income collected? Can I file both the schedule E and the 4797?