The problem seems to be in the prerm script of the deb file. Instead of removing /lib/linux-restricted-modules/.nvidia_new_installed it tries to remove /lib/linux-restricted-modules/.nvidia_legacy_installed.
The problem seems to be in the prerm script of the deb file. Instead of removing /lib/linux- restricted- modules/ .nvidia_ new_installed it tries to remove /lib/linux- restricted- modules/ .nvidia_ legacy_ installed.