rewrite instpkg.