/usr/share/postgresql/10/contrib/uninstall_pgq.sql is in postgresql-10-pgq3 3.2.6-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2
-- brute-force uninstall drop schema pgq cascade;