Error while trying to update packages

when i try to update the system i get this error

/etc/grub.d/40_custom_proxy: 6: Syntax error: Unterminated quoted string
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-5.15.0-52-generic (--remove):
installed linux-image-5.15.0-52-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.15.0-52-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
nexus7@nexus7-Lenovo-ideapad-320-15AST:~$