migrate libdir functionality from config to new libdir subcmd
remove dead code