How can I remove unused code after uninstalling apps?

@Duncan8 unless you’ve kept code in version control the main way to get rid of lots of vestigial app code is to download fresh version of the theme and transplant any custom code you want to the newer version.