How does this compare to a machine that breaks and is thrown away before its amortization is complete? For the machine can you immediately deduct the remaining amount or is it required to continue to spread the value over the original time period?
I would imagine software that is thrown away should be similar?
Generally speaking, yes, you can immediately deduct the non depreciated value. Most machines will be scraped, giving them a "scrape value". You would immediately deduct the difference.
In fact, sometimes when you dispose of an asset, you get more for the scrape than you have left in depreciation- and you have to take that difference as a profit.