Ubuntu – Why does apt removes unwanted packages when giving * as suffix?


I did a sudo apt-get remove ruby* and then I saw that some grub packages were being removed too so I went to installed back those packages which log showed to have removed

I set grub to work on my /sda (in general, not any number) when was installing back.

Should all be ok or should I fear for my system and plan installing/reconfiguring more of grub.

And, why did this happpen?

Best Answer

Try this command on terminal,

sudo grub-install /dev/sda

It will reinstall grub2 on your disk.

If you want to configure your grub then install grub-pc package.Try the below command to install grub-pc package,

sudo apt-get install grub-pc

Note: Install this package only if you installed Ubuntu in Legacy mode.