postgresql: .pgpass not working March 31, 2023 by Tarik Did you try specifying the host, user, & db? pg_dump -U someuser -h localhost somedb > directory/somefile.dump