I need help with increasing the size of the file-system partition. Partitioning-o-phobia! [duplicate]
Most the time I help users with that problem, they don't really miss some space for the system, 20 Gb is large for system files (/). The problem is often that they need to clean useless updates and packages.
Step 1: delete old kernels
If you are using a Ubuntu 12.04 LTS and it is installed for monthes, you have a lot of useless kernels installed with security updates. More, if you are using some restricted drivers for your graphic card, you have too many kernel headers installed. Every kernel and headers take a huge amount of space, and it is usually the cause of lack of your problem.
To do the cleanup more easily, I recommend to install the good old Synaptic package manager. In a terminal:
sudo apt-get install synaptic
Of course, you can do that with Software Center or Aptitude too.
Launch Synaptic, it will ask for your password. In the search tool, type and find linux-image
. Select name of the package, not "description".
Then, go at the bottom of the list, keep the two or three latest kernels installed. And going up, right click on older kernels, and select "Mark for complete removal".
Once done, do the same with packages named `linux-headers". Take care to keep the headers coordinate to the images you keep.
Then, click on "Apply" in the top bar of Synaptic. And wait, for it can take some time to remove a lot of old kernels.
Step 2: remove useless packages
The aim is to remove the package your system don't need anymore. This is done with two simple terminal command, for I don't know how to do it with a GUI.
sudo apt-get autoclean
This one removes from local apt-get cache old packages that can not be downloaded anymore. If you want to completely purge that cache, you can instead use sudo apt-get clean
.
sudo apt-get autoremove
This one check all dependencies of all packages, and then, automatically remove packages that are not anymore needed by the system or an application. Very useful if you install and removes applications sometimes.
Et voilà !
You should have recover most or your free space.
Please notice that their might be some important amount of data in your system partition:
- If you have some databases or a webserver running in the background, you might some data in /var/. It might be good to create a separate partition, or to configure the servers to use files in your /home.
- If you have a lot of Fonts files, it will be in the system partition too.
- Etc...
From the comments op said that he wants 50 GB space from the /dev/sda6
partition and add that space to the /dev/sda7
root partition.
In the gparted screenshot,it was clearly shown that there was an exclamatory mark for
dev/sda6
ntfs partition which means windows was not fully shutdown.You have to remove the exclamatory mark to resize that ntfs partition.To remove the exclamatory mark,boot into Windows,insert the ubuntu live disk then restart your pc(not shutdown).
On the startup press function+Fx key to enter into the bios.
Now change the boot-order to ubuntu live disk as first option and save the changes.
It will boot from the live-disk,now open gparted.
Now the remark for the ntfs partition will be gone.Make sure that no partitions from the /dev/sda disk would be mounted.
Right-click on the
dev/sda6
and click on Resize/Move option to shrink the space and get out of 50 GB space from that partition.An unallocated space of 50 GB was created just below to the
/dev/sda6
partition.Now you have to move the unallocated space to just below to the/dev/sda7
partition so that the size of/dev/sda7
partition will be increased.Right-click on the
/dev/sda6
partition and then select Resize/Move option.Now drag the slider to the extreme right so that the unallocated space move above to thesda6
Database partition.Next right-click on the
/dev/sda5
,and follow above step to move the unallocated space just above to the/dev/sda5
partition.Same operation would be done on the linux-swap partition.Now the unallocated space was just above to the linux-swap and just below to the
dev/sda7
root partition.Now right-click on the
dev/sda7
partition to increase it's space.That's all.I hope it would be helpful.