Strip Ubuntu 16.04 shipped with l4t 28.1 to Core ubuntu

I am trying to stip ubuntu for l4t 28.1 to core ubuntu.
I dont see the following packages seems to be usefull atall.
GCC, Unity, GNOME-DESKTOP, cursor-themes, dmz-cursor-themes etc

I would like to understand how can these be removed from rootfs so that I dont have to purge individual packages after os install.

If I have to purge them then what is the safe way?

I would remove them from a running system, and then clone the system…following this use the clone instead of the sample rootfs.

FYI, you may need to remove anything in “/etc” which is specific to udev naming of ethernet interfaces by MAC address. A running system will update this with its own MAC address…but if you copy this to a different Jetson, and if it thinks that MAC address should be there, then it probably won’t correct it. Basically you want to check if network settings files were specific to that specific Jetson.