/usr/sbin/grub-mkconfig: 35: /etc/default/grub: FROM:: not found

Solution 1:

Whenever kernel or kernel modules are updated, DPKG sources the GRUB. It seems that you were following How to disable IPv6 address on Ubuntu 18.04 Bionic Beaver Linux due to which you modified the GRUB file located in /etc/default. Originally, you were supposed to edit the corresponding lines in that file but you ended up appending those lines. And because of appending those lines FROM: and TO: were also got written there which of course isn't a valid entry for GRUB.

To fix the issue, you need to delete those lines. Edit the file in a text editor with elevated privileges

sudo nano /etc/default/grub

And delete last 6 lines, i.e. from line 35 to 40.

If you want to do what that article was telling to do, edit the lines 10 and 11 accordingly.

Solution 2:

Option 1: Reconfigure package cache

The database must have got corrupted while installing a package. Reconfigure the cache

sudo dpkg --configure -a

Option 2: Correct broken dependencies

Attempt to correct a system with broken dependencies in place. 

sudo apt install -f

Option 3: Remove post info files of the troublesome packages

sudo mv /var/lib/dpkg/info/* /tmp