The function previously worked only when there were no updates available. Pacman also does not need superuser rights to list installed packages.