Removing ubuntu from Windows 7. Safe removal of Ubuntu from Windows


Using the Ubuntu distribution as an example. In this article, we will look at the reverse process, which sooner or later those users who are not to their liking for Linux will have to resort to. How to remove Linux installed on the same Windows computer? How to get the Windows bootloader back?

To completely get rid of Linux, you need to restore the Windows boot loader, delete Linux files and resolve the issue of the future fate of the disk space that was allocated for installing this operating system (swap partition and partition with Linux files itself). Below we will look at 3 ways to remove Linux and return the Windows bootloader. Two of them are methods for computers based on a regular BIOS; they will differ in the tools used. The third method is to remove the Linux boot loader from the boot list of computers with UEFI BIOS. All operations described below are carried out inside Windows.

1. Bootice utility and Windows disk management

For the first method of uninstalling Linux and restoring the Windows bootloader, you will need two utilities - the third-party free Bootice and the standard diskmgmt.msc (disk management).

1.1. Recovering the Windows bootloader using Bootice

First of all, download the Bootice utility from its official website. For computers based on a regular BIOS, the 32- or 64-bit edition of the utility does not matter. After unpacking Bootice, launch it. On the first tab, select the desired hard drive from the drop-down list if there are several of them connected. And click the “Process MBR” button.

In the window that appears, for Windows 7, 8.1 and 10, select the “Windows NT 6.x MBR” option. In the case of Windows XP, you need to select the option above - “Windows NT 5.x MBR”. Next, click the “Install / Config” button.

We confirm.

Windows boot loader has been restored.

1.2. Removing Linux partitions in Windows Disk Management

After restoring the Windows bootloader, we go to the standard disk management utility. Press the Win+R keys and enter its name:

In the utility window, we delete two Linux partitions - specially prepared before installing it manually or automatically created by this system. In the latter case, as a rule, the Linux partitions on the hard drive are located immediately behind the Windows system partition. Without understanding the Linux file system, the Windows operating system does not assign letters to its partitions, and, accordingly, they cannot be displayed in Explorer. But in any case, it is better to focus on both these signs and the sizes of Linux partitions. To delete Linux partitions on each of them, you need to call the context menu and select “Delete Volume”.

The freed disk space can then be organized here, in the disk management utility, into a partition or several partitions acceptable for Windows (in the NTFS file system format). You can read more about creating simple partitions using standard Windows tools in.

2. AOMEI Partition Assistant

An alternative way to get rid of Linux and return the Windows boot loader for users of computers based on a regular BIOS can be offered by a functional program for working with disk space AOMEI Partition Assistant. All the tools necessary for these purposes are available in the free Standard Edition of the program. In the AOMEI Partition Assistant window on the side toolbar, in the “Disk Operations” block, select “MBR Recovery”.

In the window that appears, from the drop-down list, select the type of bootloader for the corresponding versions of Windows.

The program will warn you that after the planned operation, Linux will stop loading. Click “Yes”.

Then we apply the operation with the green button at the top of the “Apply” window.

We go through a couple of stages to confirm our intentions.

That's it, the operation is applied.

We confirm the deletion of each section.

And we arrange the freed space into a partition (or partitions) with a file system understandable for Windows. In the context menu on the unallocated space, select “Create partition”.

If only part of the space is allocated for a partition, indicate the required size. Click "Ok".

We apply planned operations.

3. Removing the Linux bootloader from the BIOS UEFI boot queue

To remove the Linux boot loader on computers with UEFI BIOS, we will use the Bootice utility mentioned in paragraph 1 of the article. But in this case, you need to download its 64-bit edition. This includes a special “UEFI” tab. Go to this tab, click the “Edit boot entries” button.

On the left, select the Linux bootloader, in this case Ubuntu. And press the “Del” button at the bottom.

The bootloader has been removed from the UEFI boot queue.

Operations for deleting Linux partitions and forming new partitions with a file system understandable for Windows can be carried out using any of the methods described above - in paragraphs. 1.2 and 2 articles.

Have a great day!

It happens that in order to solve certain problems it is necessary to install Ubuntu on top of the existing Windows operating system on the computer. After some time, the need for it may no longer be necessary, and then you need to remove Ubuntu so that it does not affect Windows in any way. Many users have difficulty with this issue. In this article, we'll take a closer look at how to safely remove Ubuntu without uninstalling Windows. Let's figure it out. Go!

If you try to insert a Windows boot disk and boot from it, you will see a prompt on the screen to install Windows. In this case, you must select “System Restore”.

After the command line window appears on the screen, enter the following commands:


The first one adds a boot entry to the system directory, and the second one adds a new boot sector.

Executing these two commands will cause the PC to immediately boot into Windows. But it is necessary to get rid of residual files (artifacts) of Ubuntu. More on this below.

There are several ways to solve this problem. The first is that you need to open the “Run” window using the Win + R hotkeys, and then enter the “msconfig” command. Next, go to the “Boot” tab and activate the “Set as default” option for the OS you want to keep. Then go to the “Control Panel” and select the “System” section. In the window that opens, open the “Advanced” tab. Below in the “Boot and Recovery” section, click on the “Options” button. Clear the checkboxes from the items “Display a list of operating systems” and “Display recovery options.” Click OK.

Now enter command prompt mode with administrator rights and run the command:

With this system utility you can remove Ubuntu from the operating systems boot menu. Right-click on the Ubuntu ID, after which a context menu will appear, and you need to select “Mark”. Then a flickering cursor will appear with the arrows “right”, “left”, “up”, “down”. It is used to move. To select text, press and hold the Shift key along with the right arrow. Next, by calling up the context window, copy and paste the text where necessary using a similar action. If you are an inexperienced user, it is better not to resort to the bcdedit application, so as not to create additional problems. If you are confident in yourself, go ahead.

After the bootloader has been restored, the final stage should be carried out by deleting all the partitions created by Ubuntu that were necessary for the normal operation of the operating system. To do this you will need to do the following:

  • Press the key combination “WIN+R” and execute the command “diskmgmt.msc”;
  • Wait for the Disk Management window to load;
  • Among the presented sections, find those that were under the leadership of "Ubuntu". This will not be difficult to do, since you created them yourself. For example, in most cases this is: a bootloader with a capacity of 100 to 300 MB, a root volume of 20-30 MB, a swap volume of 2 to 8 GB, and a main partition.
  • Each of the created partitions must be deleted by right-clicking on it and selecting “Delete Volume”.

Finally, all that remains is to properly manage the resulting unallocated space by creating a new disk partition or attaching (expanding) it to an existing partition.

Now you know how to remove Ubuntu from Windows 7 or Windows 10. Write in the comments if you managed to cope with this task, tell other users about your experience, and ask any questions on the topic of this article.

Posted 10/16/2019

Your question:

How to remove Linux Ubuntu from PC leaving Windows system?

Master's answer:

Often, having installed a second operating system on top of Windows, for example, Ubuntu, the user decides that the second one needs to be removed, since most often the Windows system is enough to perform all normal operations on a personal computer, and Linux Ubuntu requires too many settings from the owner.

If the user wants to remove Ubuntu, he needs to format the hard drive partition on which the system is installed. To do this, set the user's computer to boot from the drive in the BIOS or by selecting it when turning it on using the Esc key.

In the Microsoft operating system installation menu, you must accept the terms of the agreement, then click the “Next” button, specify the partition for installation that contains the previously installed Ubuntu operating system, it must be formatted (preferably in the NTFS file system format).

After which, following the installation instructions, you need to follow the instructions for installing Windows, enter all the data to continue working, select the time zone and set the system user.

If you need to remove the Ubuntu system without first formatting the hard drive on which the system is installed in order to preserve the integrity of Windows XP, you need to restore the operating system to the previous installation of the said version of Linux.

Next, boot from the Windows installation CD. When the installation menu starts, you need to press the R key. The user will see a recovery console - it will indicate to the user the current operating system that needs to be returned to the state prior to the installation of the Ubuntu system.

After which you need to enter the system administrator password, if it has not been set previously. It is worth paying attention to the fact that if the password contains Cyrillic letters, then it is best to first change it to another one that contains exclusively numbers and characters of the Latin alphabet.
Then enter the commands fixmbr, fixboot in the window that opens. Having completed them one by one, you need to restart your computer - after this, Ubuntu should be completely removed.

If the user has Windows Vista pre-installed, you need to boot the computer from the installation disc. Select the desired operating system language and use “Continue”.

Then select “System Restore”. When the system detects the copy of Windows installed on your computer, you need to click “Next”. The user will see “System Recovery Options” on the screen, where you need to select the “Command Prompt” element.
There, enter the line of the sequence of actions bootrec /fixboot bootrec /fixmbr, performing them one by one, after which you need to complete the operating system recovery procedure and restart the computer.

It is important to remember that in all cases, it is best to first save a copy of the necessary files for working on removable media.

It is often necessary for educational or production purposes to have another OS on one computer and install, for example, Ubuntu on top of Windows 7, and over time you need to remove the Linux-like system.

Moreover, if you use the Windows 7 boot disk and boot the computer from it, a recommendation will appear to install Windows 7 again. In this case, you need to click on the line below “System Restore”.

After this, a menu will appear in which you need to click on “Next”. In the “System Recovery Options” menu that opens, click on “Command Prompt”.

A black console window will open:

How to remove Ubuntu from the Windows 7 boot menu?

In the line you need to write the following:

  1. Bootrec.exe /FixMbr – a command that adds the master boot record to the system directory;
  2. Bootrec.exe /FixBoot is a command that adds a new boot sector to the system directory.

After completing these steps, the computer will immediately boot into Windows 7, and Ubuntu will no longer bother you. However, there may be some debris left on your computer.

How to remove residual "artifacts" from Ubuntu or any other OS?

There are the following options for solving the problem by removing garbage left over from an unnecessary system, be it Ubuntu or an old Windows:

  1. Through “Start” you need to enter “msconfig”. As a result, a standard Windows 7 utility will appear, which is used to configure the OS. Here you need to go to “Downloads” and activate the “Use as default” line for the system that you want to leave.

Then in the “Control Panel” you need to sequentially go through the chain: “All elements of the control panel” - “System” - “Advanced system settings” - “Advanced” - “Boot and recovery”, where at the top there will be the inscription “Loading the operating system” , under this inscription you need to remove the “daws” from 2 points.


These steps allow you to remove Ubuntu from the OS boot menu.

However, if the user does not have sufficient experience with "bcdedit", then it is recommended to contact a more experienced user.

For convenience and to speed up the process, it is recommended that identifiers containing a large number of characters (in the example above c7e6848... is the identifier of Ubuntu, which is being deleted) are selected and copied so as not to type them manually. To do this, you need to right-click on the command line.

This will display a context menu where you need to click on “mark”. Next, a flickering cursor will appear on a light background with arrows “right”, “left”, “up”, “down”. With its help you can perform the necessary transition. To select text, you need to hold down the Shift button and the right arrow. Next, by calling up the context window with the mouse, copy and paste the text where necessary using a similar action.

WindowsTune.ru

Safe removal of Ubuntu from Windows

It happens that in order to solve certain problems it is necessary to install Ubuntu on top of the existing Windows operating system on the computer. After some time, the need for it may no longer be necessary, and then you need to remove Ubuntu so that it does not affect Windows in any way. Many users have difficulty with this issue. In this article, we'll take a closer look at how to safely remove Ubuntu without uninstalling Windows. Let's figure it out. Go!

If you try to insert a Windows boot disk and boot from it, you will see a prompt on the screen to install Windows. In this case, you must select “System Restore”.

After the command line window appears on the screen, enter the following commands:


The first one adds a boot entry to the system directory, and the second one adds a new boot sector.

Executing these two commands will cause the PC to immediately boot into Windows. But it is necessary to get rid of residual files (artifacts) of Ubuntu. More on this below.

There are several ways to solve this problem. The first is that you need to open the “Run” window using the Win + R hotkeys, and then enter the “msconfig” command. Next, go to the “Boot” tab and activate the “Set as default” option for the OS you want to keep. Then go to the “Control Panel” and select the “System” section. In the window that opens, open the “Advanced” tab. Below in the “Boot and Recovery” section, click on the “Options” button. Clear the checkboxes from the items “Display a list of operating systems” and “Display recovery options.” Click OK.

Now enter command prompt mode with administrator rights and run the command:

With this system utility you can remove Ubuntu from the operating systems boot menu. Right-click on the Ubuntu ID, after which a context menu will appear, and you need to select “Mark”. Then a flickering cursor will appear with the arrows “right”, “left”, “up”, “down”. It is used to move. To select text, press and hold the Shift key along with the right arrow. Next, by calling up the context window, copy and paste the text where necessary using a similar action. If you are an inexperienced user, it is better not to resort to the bcdedit application, so as not to create additional problems. If you are confident in yourself, go ahead.

Now you know how to remove Ubuntu from Windows 7 or Windows 10. Write in the comments if you managed to cope with this task, tell other users about your experience, and ask any questions on the topic of this article.

NastroyVse.ru

Uninstalling Ubuntu

Yes, you heard right... Today I will actually tell you how to safely remove Ubuntu from your PC. For some reason, all blogs avoid this topic: obviously their authors do not expect such a situation to arise for the user, but it may well be autistic.

Why uninstall Ubuntu? There are many reasons, but the most common is “I didn’t like it.” We are all different individuals with our own individual needs, and what many people like, others may not like. And if so, then a person has a real need to remove Ubuntu.

First of all, we will make some disclaimers...

First caveat: Ubutu is installed along with some edition of Windows. After all, if only Ubuntu is installed, then you don’t need to delete anything - you simply install a new OS, erasing all data from the hard drive.

Second disclaimer: we are uninstalling Ubuntu to revert to a configuration where the PC has only one OS (Windows) installed. The main goal is to remove the grub bootloader, which prompts you to select one of the installed operating systems.

Attention: transfer all the necessary data from Ubuntu partitions to Windows partitions. Backup is also never superfluous.

Before performing the Ubuntu uninstall operation, make sure that you have a Windows installation disk.

We insert the installation disk into the drive and wait until it boots to the window in which it will offer to restore Windows from the command line. This is the option we choose. Next we execute only three commands:

Fixboot fixmbr exit

After which the PC will reboot directly into Windows (we have removed the menu for selecting an OS to boot). Then all you have to do is use standard Windows tools to change the Ubuntu partitions or format them into a file system that Windows “understands.”

The whole process also begins with booting from the Windows 7 installation disk, after which we select “System Restore”, after which we will be offered a list of installed MS family systems. Next, select “Startup Repair”. That's it, all that remains is to reboot and put the Linux partitions in order.

Other versions of Windows OS

I did not consider them for two reasons: the very low popularity of these OSs and my ignorance of these OSs.

Note: Never do this on production machines. After all, administrators or an organization that provides IT services can be “rejoiced” greatly.

ubuntueasy.com

Removing Linux from your computer

If you installed Linux and then realized that you are not yet ready to work in an unknown environment, then you will definitely have a question about how to get rid of the new system. Let's see how to remove Linux if it was installed next to Windows or was the only installed system on the computer.

Uninstalling Linux

The easiest way to get rid of Linux is to install Windows on top of it by formatting the disk. Let's look at the procedure using the example of installing Windows 7 (you can read more about this in the article on how to install Windows 7 from a flash drive). After selecting the installation type and accepting the license agreement, the wizard will prompt you to specify the partition on which the system will be installed.

You can partition the disk again or use existing partitions. In any case, after installing Windows, there will be no traces of Linux on the computer. Instead of Windows, you can install another version of Linux. The principle is the same: during installation, you need to re-partition the disk, deleting all old data.

Uninstallation in Windows environment

If you have a Windows system installed, then to uninstall Linux you need to delete the corresponding partitions of your hard drive. This is done like this:

When you delete a partition, all information that was stored on it will be destroyed. Therefore, if you had any important files on Linux, throw them onto a flash drive or transfer them to those partitions that are used by the Windows system. After deleting partitions, unallocated space will appear. To start using it in a Windows environment, you need to expand one of the remaining partitions by adding free space to it.

  1. Right-click on the section you want to expand.
  2. Select the "Expand" option.
  3. Specify the volume to be added to the existing partition.

It is not necessary to expand the existing volume - you can simply create a new partition, assigning it a different letter. In any case, the main difficulty awaits you ahead - after restarting the computer, Windows will not start. The reason is described above: the bootloader was removed along with Linux. You can resolve this error using the Windows installation disc.

Bootloader recovery

We have already discussed in detail how to restore the startup of Windows 7. Let's try to apply the knowledge we have gained to solve a specific problem - after removing Linux, Windows does not boot.

  1. Connect the installation flash drive (disk) with the distribution kit of installed Windows.
  2. Go to the "System Restore" section.
  3. Select the Command Line tool.

To restore the bootloader you need to enter two commands. After entering each command, do not forget to press Enter:

  • bootrec /fixmbr – creates a boot entry.
  • bootrec /fixboot – writes a new boot sector to the system partition.

The Windows bootloader has been restored and you should no longer encounter any problems when trying to start the system. If you decide to install another version of Linux, then the whole story will repeat itself: the Windows launch parameters will be registered in the common bootloader of the two systems.

Finally, a little theory.

Deleting a boot entry is not an error. This is a consequence of installing Linux next to Windows.

During installation, Linux sees that there is a second system and puts it in the list so that users can choose which environment to boot into when they turn on the computer. When you uninstall Linux, you also erase the bootloader program in which the Windows boot record was stored. Therefore, you then have to use the installation disk to restore the boot.

mysettings.ru

How to remove Linux installed next to Windows and return the latest bootloader

Previously, the site’s pages described the process of installing Linux next to Windows using the Ubuntu distribution as an example. In this article, we will look at the reverse process, which sooner or later those users who are not to their liking for Linux will have to resort to. How to remove Linux installed on the same Windows computer? How to get the Windows bootloader back?

To completely get rid of Linux, you need to restore the Windows boot loader, delete Linux files and resolve the issue of the future fate of the disk space that was allocated for installing this operating system (swap partition and partition with Linux files itself). Below we will look at 3 ways to remove Linux and return the Windows bootloader. Two of them are methods for computers based on a regular BIOS; they will differ in the tools used. The third method is to remove the Linux boot loader from the boot list of computers with UEFI BIOS. All operations described below are carried out inside Windows.

1. Bootice utility and Windows disk management

For the first method of uninstalling Linux and restoring the Windows bootloader, you will need two utilities - the third-party free Bootice and the standard diskmgmt.msc (disk management).

1.1. Recovering the Windows bootloader using Bootice

First of all, download the Bootice utility from its official website. For computers based on a regular BIOS, the 32- or 64-bit edition of the utility does not matter. After unpacking Bootice, launch it. On the first tab, select the desired hard drive from the drop-down list if there are several of them connected. And click the “Process MBR” button.

In the window that appears, for Windows 7, 8.1 and 10, select the “Windows NT 6.x MBR” option. In the case of Windows XP, you need to select the option above - “Windows NT 5.x MBR”. Next, click the “Install / Config” button.

We confirm.

Windows boot loader has been restored.

1.2. Removing Linux partitions in Windows Disk Management

After restoring the Windows bootloader, we go to the standard disk management utility. Press the Win+R keys and enter its name:

In the utility window, we delete two Linux partitions - specially prepared before installing it manually or automatically created by this system. In the latter case, as a rule, the Linux partitions on the hard drive are located immediately behind the Windows system partition. Without understanding the Linux file system, the Windows operating system does not assign letters to its partitions, and, accordingly, they cannot be displayed in Explorer. But in any case, it is better to focus on both these signs and the sizes of Linux partitions. To delete Linux partitions on each of them, you need to call the context menu and select “Delete Volume”.

The freed disk space can then be organized here, in the disk management utility, into a partition or several partitions acceptable for Windows (in the NTFS file system format). You can read more about creating simple partitions using standard Windows tools in this site article.

2. AOMEI Partition Assistant

An alternative way to get rid of Linux and return the Windows boot loader for users of computers based on a regular BIOS can be offered by the functional program for working with disk space AOMEI Partition Assistant. All the tools necessary for these purposes are available in the free Standard Edition of the program. In the AOMEI Partition Assistant window on the side toolbar, in the “Disk Operations” block, select “MBR Recovery”.

In the window that appears, from the drop-down list, select the type of bootloader for the corresponding versions of Windows.

The program will warn you that after the planned operation, Linux will stop loading. Click “Yes”.

Have you ever wondered why a freshly installed Ubuntu with a basic graphical interface and a meager set of standard applications takes up as much as 2 GB of disk space? If so, then read on - we will put the penguin on a diet and make it take up much less space.

Formulation of the problem

Today's Linux distributions are not only fast, convenient and pleasing to the eye, but also incredibly bulky. As standard, most of them take up more than 4 GB. And this despite the fact that they are able to provide the user with only one graphical environment and a small set of applications (by the way, there are not even codecs for playing audio and video files). Where do the treasured gigabytes of free space go?

Oddly enough, the reason for Linux's gluttony lies in its main advantage. A good Linux distribution is a very flexible operating system that can adapt to any user and any hardware. It has everything to satisfy the needs of 99% of users: a huge number of drivers that can breathe life into almost any piece of hardware; a bunch of different demons, applets and widgets that make communication with these pieces of hardware simple and clear; a set of the most popular applications by users; support of several languages; various tools for people with disabilities and much more. All this can and should take up some space on your hard drive. Linux provides no less freedom of choice to programmers. Without any standardized interface to communicate with the operating system in the form of a single API, such as win32 in Windows or Cocoa in Mac OS X, Linux encourages the use of any programmer-friendly interfaces and runtime environments. The developer is free to choose his own GUI libraries, be it GTK, Qt or even FLTK. He can use any available libs without worrying that they will not be on the target system, because the package manager will install them on its own anyway. He can write applications in almost any existing programming language, and all the necessary interpreters, virtual machines and libraries will also be automatically installed. It goes without saying that when bundling the installation disk, all these endless dependencies will be included in the package, and during installation they will end up on the user's hard drive. And you shouldn’t even hope that the distribution developers will select software based on its number of dependencies and making sure that they don’t drag anything unnecessary into the system. For example, the standard Ubuntu distribution includes a simple note-taking program called Tomboy, and this small program takes up all of mono's runtime, taking up more than 30 MB of disk space. There are many more different nuances in the structure of the Linux distribution that make it more cumbersome, but those described above are the basis from which we will build, ridding the penguin of the fat layer.

Getting rid of trash

Let's start by trying to cleanse the system of clearly unnecessary slag, while preserving the original Ubuntu desktop almost unchanged and installing all any necessary applications in place.

So, install Ubuntu and execute “df -h”. The amount of occupied disk space is no less than 1.9 GB. We immediately look at the application menu. Here we have a Games section, which is hardly of any value. We delete all its contents with one command:

$ sudo apt-get purge gnome-games-common gbrainy

The gnome-games-common package will pull down aisleriot, gnomemahjongg, gnome-sudoku, gnomine, quadrapassel along with all configuration files and free up 20 MB of space for us. We go to the menu again, the most useless thing is now in the Accessories item. These are a calculator (gcalctool), a font research program (gucharmap), a disk space usage analyzer (baobab), a file search program (gnome-search-tool) and that same Tomboy. Delete:

$ sudo apt-get purge gcalctool gucharmap baobab gnome-search-tool tomboy

This operation will give us another 10 MB of space and open up the opportunity to get rid of mono. We do:

$ sudo apt-get purge mono-2.0-gac mono-charp-shell mono-gac mono-gmcs mono-runtime

That's another 30 MB.

We return to the menu again. From the completely uninteresting: a program for recording from a microphone and a video editor pitivi. Unfortunately, it is difficult to immediately determine whether a voice recorder belongs to any package, so we will install the apt-file utility, which will help do this:

$ sudo apt-get install apt-fi le
$ apt-fi le update
$ apt-fi le search /usr/bin/gnome-sound-recorder gnome-media: /usr/bin/gnome-sound-recorder

The package we need (more precisely, not needed) is called gnome-media, delete it:

$ sudo apt-get purge gnome-media

$ sudo apt-get purge gnome-dictionary wamerican vinagre tsclient rdesktop

Another 5 MB and a cleaner menu. The rest of the programs can be left in place for now and get rid of rubbish such as documentation, goodies for people with disabilities, examples, a screen saver and the Ubuntu testing system:

$ sudo apt-get purge gnome-accessibility-themes gnome-doc-utils gnome-mag gnome-screensaver screensaver-default-images xscreensaver-* gnome-user-guide example-content checkbox* branding-ubuntu

This will free up another 167 MB of space. Next, we will deal with “dangling” dependencies - packages that were listed in the dependencies of packages we have already removed and are now no longer needed. To do this we need the orphaner program included in the deborphan package:

$ sudo apt-get install deborpan

We launch the program, see the list of “orphans”, mark them with a space and select the “OK” button. At the end of the procedure, a list will be displayed again, this time listing the "orphans of orphans". We repeat all steps until the list is empty. Further cleaning will inevitably affect the functionality and appearance of the distribution, so those who love Ubuntu for what it is should stop there. Everyone else, welcome to the next section of the article.

A bunch of kernels in the boot menu

Over time, the Ubuntu boot menu may acquire a large number of kernel variants (updating the kernel does not remove the old kernel). To clear it, just run the following command:

$ aptitude purge $(aptitude search ~ilinuximage -F %p|egrep -v "$(uname -r)|linux-imagegeneric")

Big cleaning

Ubuntu includes quite a lot of applications, and not every one of them suits all users. For example, I haven’t used email programs for several years now, preferring the web interface of gmail, and the interface of the standard Ubuntu player Rhytmbox makes me sick (as, indeed, its ideological parents - Amarok and iTunes). Therefore, for me they are of no interest and only clutter the menu. Someone else may not need the IM client and office suite. And all this can be abandoned painlessly.

Probably the thickest component of Ubuntu is OpenOffice. It is, of course, very necessary if you are a student, a teacher or a secretary, but for most people it does not give up at all, so we get rid of:

$ sudo apt-get purge openoffice*

Another 256 MB of cleanliness. Not bad. Next in line: the inconvenient mail client Evolution, the completely useless video player Totem and the audio player for fans of licensed music Rhytmbox:

$ sudo apt-get purge evolution evolution-common evolution-data-server evolution-indicator evolution-plugins evolution-webcal libevolution totem totem-common libtotem* rhytmbox mediaplayer-info libgnome-media0

This is another 26 MB and a strong feeling of being right. Now we can remove the gstreamer multimedia framework used by Totem and Rhytmbox, but there are two pitfalls here. Firstly, gstreamer is heavily tied to the entire system, and completely getting rid of it will entail removing some necessary system packages. We can only get rid of the framework's utility packages, but even then we'll have to say goodbye to the Brasero disc burning program. If this is not important, then do the following:

$ sudo apt-get purge gstreamer0.10-alsa gstreamer0.10-nonlin gstreamer-0.10-nice gstreamer0.10-plugins-base gstreamer0.10-plugins-base-apps gstreamer0.10-plugins good gstreamer0.10-pulseaudio gstreamer0. 10-tools gstreamer0.10-x gnome-codec-install brasero*

Ubuntu comes with Shotwell photo manager. It may be convenient for those who take fifty photos a day, but for the average person it is much more convenient to view photos through Nautilus:

$ sudo apt-get purge shotwell

This is 4 MB. There are also things like the Empathy IM client and the Gwibber social networking client. In many ways, useful programs, but meaningless for people who cannot stomach socialism:

$ sudo apt-get purge empathy empathy-common telepathy-* gwibber gwibber-service

18 MB down. You can also remove the BitTorrent transmission client and the Firefox browser, but this is already blasphemy and is only permissible if they are replaced with Deluge and Google Chrome. Now let's move on to the "System Administration" menu. It has many more important applications, but still a lot of unnecessary stuff. For example, I absolutely do not understand the purpose of a program called Computer Janitor. She had never found something truly useless and cleaned the system in any way. Accordingly, into the firebox:

$ sudo apt-get purge computer-janitor*

The language selection utility is also a rather controversial program, in most cases completely unnecessary:

$ sudo apt-get purge language-selector language-elector-common

Now let's talk about hardware support. As I already mentioned at the beginning of the article, Ubuntu supports a huge number of different hardware, for each of which the system has not only a driver that takes up several tens of kilobytes, but also a much heavier package in the form of various daemons and applications that work with this driver.

For example, Ubuntu supports Bluetooth technology very well, for which the system has drivers, daemons, and graphical configuration programs. The only question is whether blue-toothed is needed in our time of dominance of 3G and Wi-Fi networks. I think many people no longer do. Therefore, in most cases, you can refuse Bluetooth support:

$ sudo apt-get purge bluez*

This command will remove not only the Bluetooth protocol implementation distributed in the bluez package, but also all its dependencies in the form of gnome libraries and GUIs. The gain is modest: 12 MB.

Next, do you have a scanner at home? If not, then support for scanners in the system is not needed. Ubuntu offers a simple document scanning program called Simple Scan, which relies on the standard SANE scanner library. By removing the latter, we will remove support for scanners completely:

$ sudo apt-get purge libsane

This will give us an additional 15 MB. Third: you probably have a printer, and most likely it is connected to your home machine, so if you are cleaning Ubuntu installed on a laptop, then you can also get rid of printer support:

$ sudo apt-get purge cups cups-common hpijs hplip-data gsfonts

Now it's time for video drivers. Ubuntu contains a full set of Xorg drivers, but we only have one video card. Accordingly, everything else can be removed, but to do this you will first have to find out which drivers are supported by the hardware, so as not to accidentally remove the one you need. This can be done using the following command:

$ cat /var/log/Xorg.log.0 | grep "autoconf gured driver"

Immediately after the word "Matched" the driver name will be indicated; you need to remember it. In this case, there may be several drivers, this is quite normal, and it is better to leave them all. The rest can be removed using apt-get. Just type "apt-get purge xserver-xorg-video-", double click and delete everything in order, except for those names that we remember. For example, you can take the following command, which removes all drivers except fbdev and vesa:

$ sudo apt-get purge xserver-xorg-video-(apm,ati,chips, irrus,geode,i128,i740,intel,mach64,mga,neomagic,nouveau,nv,openchrome,r128,radeon,rendition,s3,s3virge ,savage, siliconmotion, sis, sisusb, tdfx, trident, tseng, vmware, voodoo)

You can also rub various goodies for nVidia and ATi drivers:

$ sudo apt-get purge nvidia-* fglrx-modaliases radeontool

And along with them are the kernel header files, which are included in Ubuntu only to assemble and install modules for proprietary video drivers, but in a normal situation they are rarely needed and take up 90 MB:

$ sudo apt-get purge linux-headers-*

There are still quite a few different utilities and libraries left in the system that are specific to specific pieces of hardware, but we can spend the whole day dealing with each of them. Instead, we will get rid of the junk hidden deep within the system. For example, compiz (unless, of course, you need desktop effects):

$ sudo apt-get purge compiz*

The speech synthesis system can also be thrown away; it is needed by people who have vision problems:

$ sudo apt-get purge espeak* speach-dispatcher gnome-rca

Tools for developers are also most likely not needed (of course, if you are not a developer yourself):

$ sudo apt-get purge gcc-4.4 gdb make

The courchdb database along with erlang, used to store various information in Gnome, is also not needed:

$ sudo apt-get purge erlang* courchdb

The smbclient library, used to access Windows balls, is not needed on separate machines (and it also takes up more than 50 MB):

$ sudo apt-get purge smbclient linsmbclinet

We also don’t need xulrunner, which is used to create XUL interfaces:

$ sudo apt-get purge xulrunner-1.9.2

You can also cut the following console software: dc, bc, ed, ftp, lftp, pcmciutils, screen, rsync, strace, xterm, lsof, w3m, telnet, tcpdump, vim*. In this case, you should be guided by a simple rule: if you don’t know what it is, then you don’t need it.

That seems to be all. Now let’s run orphaner so that it can clean up the remaining dependencies for us:

Let's look at the amount of free space:

1.4 GB, the command "sudo du -sh /" will give a more accurate 1.3 GB. We subtract the size of the /var directory from them (you can get it like this: “du -sh /var”) and we get 1.1 GB. Almost twofold reduction in weight while maintaining the full functionality of Gnome, including configuration utilities, administration, installing and uninstalling packages, and creating network connections. We also still have access to the Firefox browser, Evince document viewer, Nautilus file manager, Eye of Gnome photo viewer and file-roller archiver.

But moreover, we can free up about 90 MB of space if we remove the documentation and unnecessary locales:

$ sudo apt-get install localepurge

We mark in the list “en” and “en_GB” (if we are working in the English version of Ubuntu), or “ru” and “ru_RU” (for the Russian version).

Let's run the program:

$sudo localepurge

Now we remove the documentation:

$ sudo /usr/share/(doc,gtk-doc)

Back to the roots

Now let's talk about what to do for people who don't want Gnome on their desktop and would like to replace it with something lighter.

In the case of any other distribution, the recipe would be extremely simple: remove all packages with the word gnome in the name, plus clean up the remainder by removing applications and libraries. But this trick won't work with Ubuntu, it has built-in "foolproofing" which, if any of the packages that break Gnome are removed, will force the installation of the kubuntu-desktop package, dragging the entire KDE with it (just try to remove gnome, and you will see what apt-get suggests for installation). Therefore, you can completely clear Ubuntu from Gnome in only two more or less simple ways: either download Ubuntu Server and install it in a minimal configuration, and then install everything that is required, or bypass the security system by deleting all gnome packages at once.

I won’t explain the first method, but I’ll say a few words about the second. In Ubuntu, there is simply a huge number of packages that make up the Gnome environment, you will have to enter their names manually until the evening (and if you are reading this in the evening, then until the morning), so I prepared a list of the necessary packages in advance and put it on . All that is required is to simply copy its contents as an argument to the "apt-get purge" command.

conclusions

The cleaning method described in the article works perfectly and has been tested more than once by the author. Of course, we could achieve even more impressive results by shrinking Ubuntu together with Gnome to 500 megabytes, but it would take a whole book to describe all the steps necessary to achieve such a goal.

Info

  • Don't be afraid to remove a package unless you're sure someone else needs it. The apt-get utility will show a list of its dependencies before removal, and you can make a decision.
  • To prevent the cache of packages downloaded using apt-get from cluttering up the system, it must be cleaned periodically: sudo apt-get clean .






2024 gtavrl.ru.