I think you can dereference clientlibs pointing to /etc in your custom code. For removal the code should not have anything building from /etc/clientlibs and filter.xml if any can also control the restriction of etc/clientlibs and just have the clientlibs at /apps level.
If the files are there under /etc/clientlibs I this it should be safe to package and remove manually. Other option to try is explore using filter.xml to replace everything from code to instance on deployment and keep nothing in code for etc/clientlibs. That should hopefully clear the clientlibs data under etc. Try these out in local first I suppose.