If you force removal of an uninstalled package, opam launches commands in current directory
### opam remove bar --force
FILE(config) Read ${BASEDIR}/OPAM/config in 0.000s
[NOTE] Forcing removal of (uninstalled) bar.1
[bar: pwd]
+ ${BASEDIR}/OPAM/opam-init/hooks/sandbox.sh "remove" "pwd"
- ${BASEDIR}
-> removed bar.1
If you force removal of an uninstalled package, opam launches commands in current directory