Clean up after upgrade.

Ticket: #3756