Linux won't start after trying to install nvidia nvenc

I entered the command:
sudo apt install nvidia-cuda-toolkit libnvidia-encode1

After restarting linux, it got stuck on:
Listening on load/save rf switch status /dev/rfkill watch
I waited a long time and forcibly restarted it

Linux startup now stops at:
Started GNOME Display Manager

Linux Debian

Have you tried removing the offending software? Boot with the installation medium, if you have it and open a Terminal. Try entering “sudo apt remove nvidia-cuda-toolkit libnvidia-encode1” and then restart. Does the system boot then?