extract removeSea from cmd_util