SEARCH

How-To Geek

Remove Ubuntu or XP from the Windows 7 Boot Menu

If you’ve ever used a dual-boot system and then removed one of the operating systems, it can still show up in Windows 7’s boot menu. We’ll show you how to get rid of old entries and speed up the boot process.

Note: If you’re still rocking Windows XP, you can remove items from the boot menu there too.

sshot-1

To edit the boot menu, we will use a program called bcdedit that’s included with Windows 7. There are some third-party graphical applications that will edit the menu, but we prefer to use built-in applications when we can.

First, we need to open a command prompt with Administrator privileges.

Open the start menu and type cmd into the search box. Right click on the cmd program that shows up, and select Run as administrator.

sshot-a3

Alternatively, if you’ve disabled the search box, you can find the command prompt in All Programs > Accessories.

sshot-a2

In the command prompt, type in bcdedit and press enter. A list of the boot menu entries will appear.

sshot-a1

Find the entry that you would like to delete – in our case, this is the last one, with the description of “Ubuntu”. What we need is the long sequence of characters marked as the identifier. Rather than type it out, we will copy it to be pasted later.

Right-click somewhere in the command prompt window and select Mark.

sshot-a4

By clicking the left mouse button and dragging over the appropriate text, select the identifier for the entry you want to delete, including the left and right curly braces on either end.

sshot-a5

Press the Enter button. This will copy the text to the clipboard.

In the command prompt, type in: (make sure to put a space at the end)

bcdedit /delete

and then right-click somewhere in the command prompt window and select Paste.

sshot-a8

Press Enter to input the now completed command. The boot menu entry will now be deleted.

Type in bcdedit again to confirm that the offending entry is now gone from the list.

sshot-a7

If you reboot your machine now, you will notice that the boot menu does not even come up, because there is only one entry in the list (unless you had more than two entries to begin with).

sshot-3

You’ve shaved a few seconds off of the boot process! Not to mention the added effort of pressing the enter button.

There’s a lot more that you can do with bcdedit, like change the description of boot menu entries, create new entries, and much more. For a list of what you can do with bcdedit, type the following into the Command Window.

bcdedit /help

While there are third-party GUI solutions for accomplishing the same thing, using this method will save you time by not having to go through the extra steps of installing an extra program.

Trevor is our resident Linux geek, but always keeps his eyes open for neat Windows tricks too.

  • Published 05/24/10

Comments (47)

  1. Ironmonkey

    I have an invlaid Windows XP boot option that I would like to get rid so will defo try the above !!

    In case people are a bit scared of doing this and getting it wrong then you can always set your timeout to zero seconds (obviously if the correct system is the default one !).

    Kind regards,

  2. roger

    I followed your instructions and got a message like command not recognized, tried again and got the same. So I looked closer at your screenshots and noticed you left a space after “delete” and before the identifying string. When I copied that it worked like a charm.
    I had downloaded Ubuntu to have a look at, but decided it wasn’t for me at the moment,and having uninstalled it had absolutely no idea how to remove the boot screen entry. So, thank you very much for this.
    roger

  3. baris

    This is easier with EasyBCD, free & can be downloaded from NeoSmart Tech web site.

  4. azizrahman

    is it done on xp also, can u recommend thirty party tools to be used in xp

  5. The Geek
  6. AJS

    Can’t you use msconfig for this?

  7. Patrick

    I have a currently valid XP install along side a newer and preferred Windows 7 install. Originally I was running Windows XP. I installed Windows 7 along side it (on a separate partition) as a dual boot option. Currently, under disk management the XP partition is listed as the System partition. The Windows 7 partition is listed as the Boot partition. Can anyone point me in the right direction of how to get rid of the XP (system) partition while still allowing my windows 7 partition to load? I am not really interested in a fresh install of the OS.

    Is the tip describe above what I need, or is it only part of the process? Is what I am looking to do possible?

    Thanks for all the help.

  8. Trevor Bekolay

    @ AJS

    I tried that, but it didn’t list Ubuntu when I had the dual-boot system set up. I might have missed something, but the fact that it didn’t show up in msconfig but showed up with bcdedit tells me that bcdedit is a more robust way to edit boot menu entries.

    @ Patrick

    If I’m understanding correctly, all that you should need to do is mark the Windows 7 partition as “Active” in Disk Management (right click on it, should be an option to set it to active) and then you can format the Windows XP partition.

    After doing that, you will probably need to follow the instructions in this article to get rid of XP in the boot menu.

    I got the info from this forum thread and haven’t tested it myself, so exercise caution!

  9. Zach

    Been looking for a way to do this without overwriting or otherwise changing my master boot record (still dual-booting with Ubuntu but letting grub2 take care of things). Thanks a ton.

  10. CTown

    Thanks alot for the help. My cousin somehow got his hand on an XP install cd and somehow managed to install it. I then reinstalled Vista (for some reason to D:\). Now I had Two different Vista loaders that did the same thing; plus, a loader that version of Windows to “Boot An Older Version of Windows”. trying to delete it (it had an identifier of {ntloader} and had an entry of “Windows Legacy Loader”. I tryed to delete it and it gave me some wierd error about “/f”. I took the plunge and added it to the command yeilding “bcdedit /delete {ntloader (or something like that)} /f” and it worked. Just wanted to post my experience and incredible luck. That was terrifying!

  11. Jeff Jones

    Badass tip man, thanks! I tried out OSX on my lappie for a while and couldn’t figure out how to rid myself of that entry.

  12. Eric

    @IronMonkey
    I tried using the windows bootloader (mostly to try a fast-switching program which failed miserably) but I did try to set the timeout to zero. Unfortunately, it still flashed the bootloader for a split second… bothered me… but this fixed it!

  13. Patrick

    @Trevor

    Thanks for the suggestion and the link. I will try that next chance I get.

  14. Jason Saggers

    I tried this and ubuntu never shows up on the list, so i just go into computer management and delete the ubuntu partition then throw in either the Vista boot DVD or a Vista repair disk, boot from that and at the command prompt type the below items one after the other.
    bootrec /fixboot
    then
    bootrec /fixmbr

    Reboot and now windows in in control again (so to speak)

  15. Jeff

    To remove XP off of you boot menu I believe the cmd is ” bcdedit /delete {ntldr} /f “

  16. Louis

    Thank you so much Jeff,didn’t know how to use the /f command.

  17. ben

    after that, I do get the same result as you, however, I couldn’t format the partition of the removed os, in this case, ubuntu or a os users didn’t want. as the partition of deleted os is marked “in using” from the disk managment. so what i want is to retake the space of that partition and leave the drive, the whole drive available for use by my leaved os, win7. how to do so?

  18. Shahar

    Your’e a genius!! Thank you so much, you won’t believe what I’ve gone through trying to remove this annoying ubuntu from win 7, even re-installed win 7 (which didn’t help!).
    Thanks!

  19. adriane14

    tnx realy working……solved my duplicate boot problem

  20. Oliver

    I may actually love you!!

  21. Trevor Bekolay

    @ Oliver

    I love you too.

  22. bluemoon

    Thankz…
    and another explanation can find here..
    http://www.sevenforums.com/tutorials/2676-bcdedit-how-use.html?ltr=B

  23. ThreeApples

    Thanks! I’ve spent far too many hours looking for this solution.

  24. prem

    This is exactly what i was looking for!!!! thanks man!!

  25. Aseem

    What if for the identifier, it says default?

  26. Sachin

    Thank you. I had the exact same situation as described in your howto. I couldn’t be happier after reading your post :-)

  27. Rijo

    thanks alot man!!!!!!!!

  28. shanthan

    thanks buddy
    really helpful

  29. riandhito

    terima kasih banyak ! thanks you it’s work !!!! … peace love from indonesia

  30. roaa

    thanks bro,
    this is really a good article and solution.

  31. Sammy

    i follow your instruction but the OS i had removed is windows xp, the problem is that the identifier is{ntldr}. so iam currently at lost.
    Sammy

  32. Younis

    Worked fine. Thank you.

  33. daniel

    i have tried it and it does not work does it only work on 64-bit?Because my machine is 32-bit

  34. thenicewilly

    Thanks a lot !!! Works great !!!

  35. faiz

    working…… thnx a lot

  36. Anuj

    I use Win7 Home Basic-64bit and Ubuntu 11.04-64bit on separate partitions. I want to remove Ubuntu completely. On trying bcdedit, I found that it was located in the ‘C:\Windows\winsxs\amd64_microsoft-windos-b..iondata-cmdlinetool_31bf3856ad364e35_6.1.7601.17514_none_e6510234bbcb2a8c’ folder. It didn’t work, gave me the error – ‘The boot configuration data store could not be opened.
    Access is denied.’ (I am logged in as administrator.) This makes me wonder if these instructions are valid only for 32-bit machines. Anybody else found this problem? Any workarounds?

  37. Leffien52

    Hello, and thank You!
    I got rid of the black screen where the white message told me to choose
    between Windows 7 and , in my case, Windows XP!
    But still, before it automatically starts windows7, I still get a message with
    a line containing the name of Vista, which I never had, windows XP and windows 7 in different colours!
    This is shown while it counts down from 20 seconds before it now starts windows 7 as I wanted in the first place!

    Can somebody help me with that, and also help me to tell me what I shoul read to get the full
    picture and control over what Windos 7 is doing during boot up time?
    I would be delighted to hear from anybody.
    Again thanks so far!
    Regards Leffien52.

  38. Prem

    I have 2 windows……windows xp and windows 7….windows7 is working but windows xp is not working…. And i want to remove windows xp ……
    plz tell me anyone how to remove windows xp…

  39. Swaraj Mohapatra

    Well, my dear friend I had Installed debian incompletely being a student in class 11-i was trying out my debian which needed to install from boot menu but problems arised and me smart became me idiot. Thanks to your help, now its fine and i am relaxed. next time i’ll think twice before installing operating systems. for the moment for fishing me out of this trouble-thanks a lot,friend!

  40. DAH

    Worked just fine. Rather refreshing to have advice that is clear and concise and most of all works. Thanks Very Much

  41. Mr. White

    Thanks a lot, worked great. The other solutions had me putting in my boot disc and god knows what, this was elegant and simple, many thanks.

  42. magoo56

    that will be helpful. but i do have a question. does it just only removing the the menu from the boot menu??does it uninstall the os too?please… i need answer :)

  43. Alix

    Worked perfect for me running Windows 7 and trying to get rid of Ubuntu, thank you.

  44. yadhu

    thanks alot buddy!!! it was really helpful.. :)

  45. jeewan

    thanku very much

  46. Len

    There is a much more simple way of doing this – especially for a novice like myself:

    you can change default boot OS by right clicking my computer, and selecting properties. then on the left, advanced system settings. click advanced, then settings under startup and recovery. you can also change the duration of the boot manager there, set other vesions to 0 or simply deselect the tick box.

    Hope this helps

  47. Len

    I suppose I should mention that this worked on Windows 7, with a legacy version of Windows XP

Enter Your Email Here to Get Access for Free:

Go check your email!