Uninstalling packages pulled by a meta-package is always hard, if not impossible. However, Since you're desperately willing to remove those, even using manual guessing, I can suggest a good alternative.
The packages installed, upgraded or removed are logged in /var/log/apt/history.log
file. It is relatively easier to just copy the package names from relevant section and manually uninstall them.
Here is a sample of a section from the file
Start-Date: 2016-12-12 19:15:40
Commandline: aptdaemon role='role-commit-packages' sender=':1.293'
Install: libva-tpi1:amd64 (1.7.1-2~gd~x), intel-gpu-tools:amd64 (1.15-1intel1), libva-egl1:amd64 (1.7.1-2~gd~x), vainfo:amd64 (1.7.1-2~gd~x), libva-glx1:amd64 (1.7.1-2~gd~x)
Upgrade: libgles2-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm-nouveau2:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-nouveau2:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libegl1-mesa-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgles1-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libglapi-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libglapi-mesa:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), mesa-common-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libxatracker2:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libegl1-mesa-drivers:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libegl1-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgbm1:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm-amdgpu1:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-amdgpu1:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libwayland-egl1-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgles2-mesa-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm2:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm2:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libgl1-mesa-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-dri:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-dri:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libosmesa6:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libosmesa6:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-glx:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-glx:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm-intel1:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-intel1:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-radeon1:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-radeon1:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-dev:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x)
End-Date: 2016-12-12 19:16:59
You can find the required package name from Install:
field's value. Maybe even employ some textual parsing to pull the package names from it.
Hope this helps a bit at least.
Update
I've written a Ruby script to help see the packages get installed with a command, so that those can be removed later. But caution should be practiced because your later installed some package might also be dependent on some of them. It still isn't finished and I want to expand it. Anyway, check it here https://github.com/AnwarShah/apt-remove-meta
- Download the zip file or clone the repo
cd
to the directory and
- Run
ruby search-apt-log.rb
. It will ask for a search term, give it. Then it will give you a history of all apt event involving that term. You can then see which packages get installed and remove them by copying the names.