Simpler version of pkg_repl()