Investors & landlords

When you are depreciating assets and you sell the property do you get all the undepreciated value left as a write off or just the current years portion up to the sale and the rest is lost?   Just trying to get my head around this.  Thanks!