You can take queries away by Taking away the hack code in the files are removing the queries from the Database. (This is if the hack required to add a querie with a program like phpmyadmin)
But most only need you to remove code etc, just watch your queries and make sure you read the hack post to see if the hack you're installing is a big query user.
I'm not a big hacks person, but it's always important to watch the queries. AL and filburt know alot more about it then I do.