What is the easiest way to remove all development library packages that have been installed manually, i.e. via apt-get install libsomelib-dev, on Ubuntu 22.04?
Something like:
sudo apt-get remove lib*-dev
But excluding those libraries that are needed for other programs. The above command causes a lot of applications and essential system packages to be removed as well - that's what I'm trying to avoid.