In order to cleanup orphaned SharePoint application pools follow the steps below
1) Open the SharePoint 2010 Management Shell on the server you wish to cleanup
2) Run Get-SPServiceApplicationPool
3) Note the Name of the application pool you wish to remove
4) Run Remove-SPServiceApplicationPool passing in the name of the application pool to be removed, e.g.
Remove-SPServiceApplicationPool “User Profile Sync”