/var/lib/dpkg/info location of the package maintainer scripts (postinst, prerm, etc) as well as other pieces of packaging data like md5sums, conffile lists, etc.
auto-apt useful tool, play with it and document it here your data on dpkg --set-selections is wrong: sudo dpkg --set-selections hold foo dpkg: --set-selections does not take any argument proper call is: dpkg --set-selections<enter> foo hold<enter> Ctrl-D or maybe echo "foo hold" | dpkg --set-selections.