Credits for Home Office or not?

A % of my Home maintenance expenses have been deducted each year as Home Office. The Home office (one bedroom) is on the premises of my condo (same building) in which I have my primary residence. When I decide to sell the condo eventually, what are my tax consequences on capital gain of the condo sale? If I want to avoid the tax consequences (if any), for how long should I NOT deduct my home maintenance expenses as home office expenses?