If you have deleted one linux OS and currently have another linux OS partition-
Step1: #ls
step2: Check for your root partion location.
step3: Let our root partion is (hd0,gpt5)
step4: Then
#set root=(hd0,gpt5)
#set prefix=(hd0,gpt5)/boot/grub
#insmod normal
#normal
If you have deleted one linux OS and currently have another Windows OS partition-
Step1: #ls
step2: Check for your Windows C Drive/root partion location.
step3: Let our root partion is (hd0,msdos2)
step4: Then
#set root=(hd0,msdos2)
#set prefix=(hd0, msdos2)/boot/grub
#insmod normal
#normal
Thanks and regards Saurabh Singh