The accounting entry depends on whether the asset is being sold or scrapped.
Entries marked with (P&L) should be posted to a profit or loss code. All others are posted to balance sheet codes.
DR Cash (if sold);
DR/
CR Loss/profit on disposal* (P&L);
CR Fixed Asset Cost;
DR Accumulated Depreciation
*Loss/profit on disposal amount is the balancing figure after taking out the asset's cost, accumulated depreciation and recognising the proceeds of sale (if any).
If the asset is scrapped then the loss on disposal will be the net off the cost and accumulated depreciation.