Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed ubuntu 10.04 LTS and formatted my windows 7 hdd, but the windows 7 entry is still showing in grub. How can I remove the entry from grub?


share|improve this question

migrated from Jun 3 '10 at 11:35

This question came from our site for professional and enthusiast programmers.


You should edit the /etc/default/grub and add the following line:


save it and perform

sudo update-grub .

It will remove Windows from your GRUB menu list.

Hide/remove Windows entry from Grub menu list

share|improve this answer
Thanks. This worked. – noir1993 Feb 14 '15 at 20:10

If I remember corretly, you need to edit /boot/grub/menu.lst on your linux drive and remove the windows 7 entry (it's a text file)

The entry looks something like this:

title Windows 7
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1 
share|improve this answer
That would be correct for grub 1, but Ubuntu 10.04 uses grub 2, which has a more complicated scheme, generated from files in /etc/grub.d – Douglas Leeder Jun 3 '10 at 10:44

Ubuntu 10.04 LTS uses Grub2, which no longer uses the /boot/grub/menulist.lst file for configuration.

Instead, you should edit the file /etc/default/grub.

If your hard disk still contains a Windows partition, add the line:


to prevent Windows being added to your grub menu.

To write the change, run

sudo update-grub

which will write a new /boot/grub/grub.cfg file.

You can then run

cat /boot/grub/grub.cfg

to check that your Windows entry has disappeared.

Further information can be found on this page:

share|improve this answer

If the entry was manually created, all you need to do is remove the corresponding file in /etc/grub.d/ using the command:

sudo rm /etc/grub.d/<filename>

Make sure you know what you're doing, you don't want to delete the wrong file as it will cause boot problems.

Also, you might not want to disable os-prober if you have a dual- or multi-boot system.

share|improve this answer
Thank you @Burgi for the formatting! – ElMimz Jun 2 at 16:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.