Whenever possible, it is best to do without these libraries (c.f. http://youmightnotneedjquery.com) or to only keep the parts which are actually used (c.f. http://getbootstrap.com/customize). If this is not feasible, download the source code and create a custom build that only includes the necessary components.
Some frameworks, like Boostrap here, offer the ability to create custom-built libraries which only contain the sections actually used by the website, reducing the size of the libraries and the resources consumed when run.