How to Increase or Alter Partition size in Linux without Re-installation of Fresh-installation?

Asked by Navin Talati

I have 1 TB HDD in which Ubuntu 14.04 was freshly installed keeping partitions as under:

/dev/sda
 /dev/sda1 ---> ext4 /boot 3GB
 /dev/sda3 ---> ext4 / 35GB
 /dev/sda4 ---> swap 12GB
 /dev/sda7 ---> ext4 160GB
 /dev/sda5 ---> ntfs 419GB
 /dev/sda6 ---> ntfs 371GB

During fresh installation as above, the last THREE partitions, ( /dev/sda7, /dev/sda5, and /dev/sda6) being data partitions, were kept untouched and as such. They were not formated. /dev/sda1, and sda3 were ticked to FORMAT and sda4 ofcourse being a swap does not show the the option to format. Thus Ubuntu 14.04 was installed. The HDD having total 1 TB space was split as --> TWO ntfs type (about 790 GB ) partitions are kept for data writing for Windows and Linux. Remaining 210 GB was spared for Linux / Ubuntu Installation. In that 160 GB as Secondary partition for data and remaining 50 GB were spread into for /boot, / and swap as above table.

Over a period of time, for about last couple of months the “/ ” partition shows some warning of lower free space available. (35 GB space shows actually 34.3 GB of which 28.3 as Used and 4.2 GB as Free as per “Properties” in “Computer”)

Now, the OS is upgraded to UBUNTU 15.04 and it may require some more space in “ / “ partition when I add some more softwares or applications etc.

(1)
Can I increase the space of this “ / “ partition without disturbing the OS ?

(2)
How can I alter the space in Linux partitions without disturbing the whole installation ?

Guidance is humbly requested. I have also no thorough knowledge in computer or linux. In other words, I an technically poor, so stepwise detailed guiodance is requested. Please.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Navin Talati
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Resizing partitions is not an easy task. You have to copy data around, probably even using an external medium for intermediate storage.

Maybe an easier solution to your problem is cleaning up unused data from your partitions.

Please provide the output of the commands

uname -a
lsb_release -crid
df -h
df -i
dpkg -l | grep ' linux-i'
dpkg -l | grep ' linux-h'
apt-get --simulate autoremove
apt-get --simulate autoclean

Revision history for this message
Navin Talati (n-m-talati) said :
#2

Sir,

(1)
I would like to request you very personally and additionally to make it convenient to state the meaning of each of the SEVEN commands above (as stated in #1). This will add to my knowledge.

(2)
The OUTPUT of the above all the SEVEN commands is as under:
---------------------------------------------------------------------------------------------------------------------------------------------------
navin@navin:~$ uname -a
Linux navin 3.19.0-17-generic #17-Ubuntu SMP Wed May 6 16:46:32 UTC 2015 i686 athlon i686 GNU/Linux
navin@navin:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid
navin@navin:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 405M 6.5M 398M 2% /run
/dev/sdb3 32G 27G 3.6G 89% /
tmpfs 2.0G 172K 2.0G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sdb1 2.7G 485M 2.1G 19% /boot
tmpfs 405M 52K 405M 1% /run/user/1000
/dev/sr0 459M 459M 0 100% /media/navin/Maxei
/dev/sdb5 391G 215G 176G 56% /media/navin/HOME_STORE
navin@navin:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 209524 681 208843 1% /dev
tmpfs 214727 939 213788 1% /run
/dev/sdb3 2138112 867906 1270206 41% /
tmpfs 214727 11 214716 1% /dev/shm
tmpfs 214727 7 214720 1% /run/lock
tmpfs 214727 15 214712 1% /sys/fs/cgroup
/dev/sdb1 183264 382 182882 1% /boot
tmpfs 214727 30 214697 1% /run/user/1000
/dev/sr0 0 0 0 - /media/navin/Maxei
/dev/sdb5 184559672 237347 184322325 1% /media/navin/HOME_STORE
navin@navin:~$ dpkg -l | grep 'linux-i'
ii linux-image-3.13.0-29-generic 3.13.0-29.53 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-30-generic 3.13.0-30.55 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-32-generic 3.13.0-32.57 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-33-generic 3.13.0-33.58 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-34-generic 3.13.0-34.60 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-35-generic 3.13.0-35.62 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-36-generic 3.13.0-36.63 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-37-generic 3.13.0-37.64 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-38-generic 3.13.0-38.65 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-40-generic 3.13.0-40.69 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-44-generic 3.13.0-44.73 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
ii linux-image-3.13.0-46-generic 3.13.0-46.79 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
rc linux-image-3.13.0-47-generic 3.13.0-47.78 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
rc linux-image-3.13.0-48-generic 3.13.0-48.80 i386 Linux kernel image for version 3.13.0 on 32 bit x86 SMP
rc linux-image-3.16.0-33-generic 3.16.0-33.44 i386 Linux kernel image for version 3.16.0 on 32 bit x86 SMP
ii linux-image-3.16.0-34-generic 3.16.0-34.47 i386 Linux kernel image for version 3.16.0 on 32 bit x86 SMP
ii linux-image-3.16.0-36-generic 3.16.0-36.48 i386 Linux kernel image for version 3.16.0 on 32 bit x86 SMP
ii linux-image-3.16.0-37-generic 3.16.0-37.49 i386 Linux kernel image for version 3.16.0 on 32 bit x86 SMP
ii linux-image-3.19.0-16-generic 3.19.0-16.16 i386 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
ii linux-image-3.19.0-17-generic 3.19.0-17.17 i386 Linux kernel image for version 3.19.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-29-generic 3.13.0-29.53 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-30-generic 3.13.0-30.55 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-32-generic 3.13.0-32.57 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-33-generic 3.13.0-33.58 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-34-generic 3.13.0-34.60 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-35-generic 3.13.0-35.62 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-36-generic 3.13.0-36.63 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-37-generic 3.13.0-37.64 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-38-generic 3.13.0-38.65 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-40-generic 3.13.0-40.69 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-44-generic 3.13.0-44.73 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii linux-image-extra-3.13.0-46-generic 3.13.0-46.79 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
rc linux-image-extra-3.13.0-47-generic 3.13.0-47.78 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
rc linux-image-extra-3.13.0-48-generic 3.13.0-48.80 i386 Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
rc linux-image-extra-3.16.0-33-generic 3.16.0-33.44 i386 Linux kernel extra modules for version 3.16.0 on 32 bit x86 SMP
ii linux-image-extra-3.16.0-34-generic 3.16.0-34.47 i386 Linux kernel extra modules for version 3.16.0 on 32 bit x86 SMP
ii linux-image-extra-3.16.0-36-generic 3.16.0-36.48 i386 Linux kernel extra modules for version 3.16.0 on 32 bit x86 SMP
ii linux-image-extra-3.16.0-37-generic 3.16.0-37.49 i386 Linux kernel extra modules for version 3.16.0 on 32 bit x86 SMP
ii linux-image-extra-3.19.0-16-generic 3.19.0-16.16 i386 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
ii linux-image-extra-3.19.0-17-generic 3.19.0-17.17 i386 Linux kernel extra modules for version 3.19.0 on 32 bit x86 SMP
ii linux-image-generic 3.19.0.17.16 i386 Generic Linux kernel image
navin@navin:~$ dpkg -l | grep 'linux-h'
ii linux-headers-3.13.0-29 3.13.0-29.53 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-30 3.13.0-30.55 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-32 3.13.0-32.57 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-33 3.13.0-33.58 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-34 3.13.0-34.60 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-35 3.13.0-35.62 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-36 3.13.0-36.63 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-37 3.13.0-37.64 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-38 3.13.0-38.65 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-40 3.13.0-40.69 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-44 3.13.0-44.73 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-46 3.13.0-46.79 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.16.0-34 3.16.0-34.47 all Header files related to Linux kernel version 3.16.0
ii linux-headers-3.16.0-34-generic 3.16.0-34.47 i386 Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii linux-headers-3.16.0-36 3.16.0-36.48 all Header files related to Linux kernel version 3.16.0
ii linux-headers-3.16.0-36-generic 3.16.0-36.48 i386 Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii linux-headers-3.16.0-37 3.16.0-37.49 all Header files related to Linux kernel version 3.16.0
ii linux-headers-3.16.0-37-generic 3.16.0-37.49 i386 Linux kernel headers for version 3.16.0 on 32 bit x86 SMP
ii linux-headers-3.19.0-16 3.19.0-16.16 all Header files related to Linux kernel version 3.19.0
ii linux-headers-3.19.0-16-generic 3.19.0-16.16 i386 Linux kernel headers for version 3.19.0 on 32 bit x86 SMP
ii linux-headers-3.19.0-17 3.19.0-17.17 all Header files related to Linux kernel version 3.19.0
ii linux-headers-3.19.0-17-generic 3.19.0-17.17 i386 Linux kernel headers for version 3.19.0 on 32 bit x86 SMP
ii linux-headers-generic 3.19.0.17.16 i386 Generic Linux kernel headers
navin@navin:~$ apt-get --simulate autoremove
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  breeze breeze-cursor-theme breeze-icon-theme frameworkintegration hddtemp
  java3ds-fileloader kde-base-artwork kde-cli-tools kde-cli-tools-data
  kde-style-breeze kde-style-breeze-qt4 kde-wallpapers-default kded5 kdesudo
  kinit kio-extras kio-extras-data kscreen ksysguardd ktexteditor-data
  kwin-style-breeze libaudclient2 libcddb2 libcln6 libdee-qt5-3
  libdirac-encoder0 libgit2-22 libgnome-media-profiles-3.0-0 libhttp-parser2.1
  libhud-client2 libid3tag0 libimlib2 libkdecorations2-5
  libkdecorations2private5 libkf5baloo1 libkf5balooxapian1 libkf5dnssd-data
  libkf5dnssd5 libkf5emoticons-data libkf5emoticons5 libkf5filemetadata-data
  libkf5filemetadata3 libkf5idletime5 libkf5jsembed-data libkf5jsembed5
  libkf5newstuff-data libkf5newstuff5 libkf5notifyconfig-data
  libkf5notifyconfig5 libkf5plasma5 libkf5plasmaquick5 libkf5prison1
  libkf5pty-data libkf5pty5 libkf5runner5 libkf5screen6 libkf5style5 libkf5su5
  libkf5sysguard5-data libkf5texteditor5 libkf5threadweaver5
  libkf5waylandclient5 libkf5waylandserver5 libkf5webkit5
  libkf5xmlrpcclientprivate5 libkfontinst5 libkfontinstui5 libksgrd5
  libkworkspace5-5 liblivemedia23 libllvm3.5 libopts25
  libplasma-geolocation-interface5 libprocesscore5 libprocessui5 libqalculate5
  libqalculate5-data libqimageblitz4 libresid-builder0c2a libsidplay2
  libssh2-1 libtaskmanager5 libtool-bin libupnp6 libusageenvironment1 libvlc5
  libvlccore7 libweather-ion7 libwxbase2.8-0 libwxgtk-media2.8-0 libwxgtk2.8-0
  libxcb-composite0 libxcb-damage0 libxmmsclient6 milou ntp
  oxygen-cursor-theme oxygen-sounds plasma-desktop plasma-desktop-data
  plasma-framework plasma-workspace python-wxgtk2.8 python-wxversion
  python3-notify2 python3-pexpect python3-pil python3-pyqt4 python3-pyqt5
  python3-renderpm python3-reportlab python3-reportlab-accel python3-sip
  qdbus-qt5 qml-module-org-kde-extensionplugin
  qml-module-org-kde-kquickcontrols qml-module-org-kde-kquickcontrolsaddons
  qml-module-org-kde-solid qml-module-qtquick-controls
  qml-module-qtquick-controls-styles-breeze qtdeclarative5-kf5declarative
  qtdeclarative5-kf5solid texlive-luatex ttf-oxygen-font-family
  ubuntu-release-upgrader-qt vlc-data
0 upgraded, 0 newly installed, 126 to remove and 1 not upgraded.
Remv plasma-desktop [4:5.2.2-0ubuntu4]
Remv breeze [4:5.2.2-0ubuntu3]
Remv breeze-cursor-theme [4:5.2.2-0ubuntu3]
Remv breeze-icon-theme [4:5.2.2-0ubuntu3]
Remv plasma-workspace [4:5.2.2-0ubuntu3]
Remv frameworkintegration [5.9.0-0ubuntu1]
Remv hddtemp [0.3-beta15-52]
Remv java3ds-fileloader [1.2+dfsg-1]
Remv kde-base-artwork [4:14.12.3-0ubuntu1]
Remv kde-cli-tools [4:5.2.2-0ubuntu1]
Remv kde-cli-tools-data [4:5.2.2-0ubuntu1]
Remv kde-style-breeze-qt4 [4:5.2.2-0ubuntu2]
Remv kde-style-breeze [4:5.2.2-0ubuntu3]
Remv kde-wallpapers-default [4:14.12.3-0ubuntu1]
Remv kded5 [5.9.0-0ubuntu1]
Remv ubuntu-release-upgrader-qt [1:15.04.14]
Remv kdesudo [3.4.2.4+repack-2ubuntu4]
Remv kinit [5.9.0-0ubuntu1]
Remv kio-extras [4:5.2.2-0ubuntu2]
Remv kio-extras-data [4:5.2.2-0ubuntu2]
Remv kscreen [4:5.2.2-0ubuntu1]
Remv ksysguardd [4:5.2.2-0ubuntu1]
Remv libkf5texteditor5 [5.9.0-0ubuntu1]
Remv ktexteditor-data [5.9.0-0ubuntu1]
Remv kwin-style-breeze [4:5.2.2-0ubuntu3]
Remv libaudclient2 [3.5~rc2-1]
Remv libcddb2 [1.3.2-5fakesync1]
Remv libqalculate5 [0.9.7-9]
Remv libcln6 [1.3.4-1]
Remv libhud-client2 [14.10+14.10.20140924-0ubuntu1]
Remv libdee-qt5-3 [3.3+14.04.20140317-0ubuntu1]
Remv libdirac-encoder0 [1.0.2-7.1]
Remv libgit2-22 [0.22.1-0ubuntu3]
Remv libgnome-media-profiles-3.0-0 [3.0.0-1ubuntu2]
Remv libhttp-parser2.1 [2.1-2]
Remv libimlib2 [1.4.6-2]
Remv libid3tag0 [0.15.1b-11]
Remv libkdecorations2-5 [4:5.2.2-0ubuntu1]
Remv libkdecorations2private5 [4:5.2.2-0ubuntu1]
Remv libkf5baloo1 [5.6.2-0ubuntu4]
Remv libkf5balooxapian1 [5.6.2-0ubuntu4]
Remv libkf5dnssd5 [5.9.0-0ubuntu1]
Remv libkf5dnssd-data [5.9.0-0ubuntu1]
Remv libkf5emoticons5 [5.9.0-0ubuntu1]
Remv libkf5emoticons-data [5.9.0-0ubuntu1]
Remv libkf5filemetadata3 [5.6.2-0ubuntu1.1]
Remv libkf5filemetadata-data [5.6.2-0ubuntu1.1]
Remv libkf5idletime5 [5.9.0-0ubuntu1]
Remv libkf5jsembed5 [5.9.0-0ubuntu1]
Remv libkf5jsembed-data [5.9.0-0ubuntu1]
Remv libkf5newstuff5 [5.9.0-0ubuntu1]
Remv libkf5newstuff-data [5.9.0-0ubuntu1]
Remv libkf5notifyconfig5 [5.9.0-0ubuntu1]
Remv libkf5notifyconfig-data [5.9.0-0ubuntu1]
Remv plasma-framework [5.9.0-0ubuntu1]
Remv libweather-ion7 [4:5.2.2-0ubuntu3]
Remv libkf5plasma5 [5.9.0-0ubuntu1] [libkf5plasmaquick5:i386 libkf5runner5:i386 ]
Remv libkf5plasmaquick5 [5.9.0-0ubuntu1] [libkf5runner5:i386 ]
Remv libkf5prison1 [1.2~git20150223-0ubuntu2] [libkf5runner5:i386 ]
Remv libkf5su5 [5.9.0-0ubuntu1] [libkf5runner5:i386 ]
Remv libkf5pty5 [5.9.0-0ubuntu1] [libkf5runner5:i386 ]
Remv libkf5pty-data [5.9.0-0ubuntu1] [libkf5runner5:i386 ]
Remv milou [4:5.2.2-0ubuntu1] [libkf5runner5:i386 ]
Remv libkf5runner5 [5.9.0-0ubuntu1]
Remv libkf5screen6 [4:5.2.2-0ubuntu1]
Remv libkf5style5 [5.9.0-0ubuntu1]
Remv libprocessui5 [4:5.2.2-0ubuntu1]
Remv libtaskmanager5 [4:5.2.2-0ubuntu3]
Remv libprocesscore5 [4:5.2.2-0ubuntu1]
Remv libkf5sysguard5-data [4:5.2.2-0ubuntu1] [libksgrd5:i386 ]
Remv libkf5threadweaver5 [5.9.0-0ubuntu1] [libksgrd5:i386 ]
Remv libkf5waylandclient5 [4:5.2.2-0ubuntu1] [libksgrd5:i386 ]
Remv libkf5waylandserver5 [4:5.2.2-0ubuntu1] [libksgrd5:i386 ]
Remv libkf5webkit5 [5.9.0-0ubuntu1] [libksgrd5:i386 ]
Remv libkf5xmlrpcclientprivate5 [4:5.2.2-0ubuntu3] [libksgrd5:i386 ]
Remv libkfontinstui5 [4:5.2.2-0ubuntu4] [libksgrd5:i386 ]
Remv libkfontinst5 [4:5.2.2-0ubuntu4] [libksgrd5:i386 ]
Remv libksgrd5 [4:5.2.2-0ubuntu1]
Remv libkworkspace5-5 [4:5.2.2-0ubuntu3]
Remv liblivemedia23 [2014.01.13-1]
Remv libllvm3.5 [1:3.5.2-0ubuntu1]
Remv ntp [1:4.2.6.p5+dfsg-3ubuntu6]
Remv libopts25 [1:5.18.4-3]
Remv libplasma-geolocation-interface5 [4:5.2.2-0ubuntu3]
Remv libqalculate5-data [0.9.7-9]
Remv libqimageblitz4 [1:0.0.6-4build1]
Remv libresid-builder0c2a [2.1.1-14]
Remv libsidplay2 [2.1.1-14]
Remv libssh2-1 [1.4.3-4.1]
Remv libtool-bin [2.4.2-1.11]
Remv libupnp6 [1:1.6.19+git20141001-1]
Remv libusageenvironment1 [2014.01.13-1]
Remv libvlc5 [2.1.4-0ubuntu14.04.1]
Remv libvlccore7 [1:2.1.5-dmo2]
Remv python-wxgtk2.8 [2.8.12.1+dfsg2-2ubuntu1]
Remv libwxgtk-media2.8-0 [2.8.12.1+dfsg2-2ubuntu1]
Remv libwxgtk2.8-0 [2.8.12.1+dfsg2-2ubuntu1]
Remv libwxbase2.8-0 [2.8.12.1+dfsg2-2ubuntu1]
Remv libxcb-composite0 [1.10-2ubuntu1]
Remv libxcb-damage0 [1.10-2ubuntu1]
Remv libxmmsclient6 [0.8+dfsg-12]
Remv oxygen-cursor-theme [0.0.2012-06-kde4.8-2.1ubuntu1]
Remv oxygen-sounds [4:5.2.2-0ubuntu2]
Remv plasma-desktop-data [4:5.2.2-0ubuntu4]
Remv python-wxversion [3.0.1.1+dfsg-2]
Remv python3-notify2 [0.3-3]
Remv python3-pexpect [3.2-1]
Remv python3-pil [2.7.0-1]
Remv python3-pyqt4 [4.11.3+dfsg-1]
Remv python3-pyqt5 [5.4.1+dfsg-2]
Remv python3-renderpm [3.1.44-1]
Remv python3-reportlab [3.1.44-1]
Remv python3-reportlab-accel [3.1.44-1]
Remv python3-sip [4.16.6+dfsg-1]
Remv qdbus-qt5 [5.4.1-1]
Remv qml-module-org-kde-extensionplugin [5.9.0-0ubuntu1]
Remv qtdeclarative5-kf5declarative [5.9.0-0ubuntu1]
Remv qml-module-org-kde-kquickcontrols [5.9.0-0ubuntu1]
Remv qml-module-org-kde-kquickcontrolsaddons [5.9.0-0ubuntu1]
Remv qtdeclarative5-kf5solid [5.9.0-0ubuntu1]
Remv qml-module-org-kde-solid [5.9.0-0ubuntu1]
Remv qml-module-qtquick-controls-styles-breeze [4:5.2.2-0ubuntu3]
Remv qml-module-qtquick-controls [5.4.1-0ubuntu1]
Remv texlive-luatex [2014.20141024-2ubuntu1]
Remv ttf-oxygen-font-family [4:5.2.2-0ubuntu1]
Remv vlc-data [1:2.2.0~pre3-dmo1]
navin@navin:~$ apt-get --simulate autoclean
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
Del linux-headers-3.16.0-37 3.16.0-37.49 [9,104 kB]
Del libgtk-3-common 3.12.2-0ubuntu15.3 [174 kB]
Del liboxideqtquick0 1.6.5-0ubuntu0.15.04.1 [254 kB]
Del liboxideqt-qmlplugin 1.6.5-0ubuntu0.15.04.1 [163 kB]
Del libgtk-3-0 3.12.2-0ubuntu15.3 [2,227 kB]
Del gir1.2-gtk-3.0 3.12.2-0ubuntu15.3 [177 kB]
Del openjdk-7-jre 7u79-2.5.5-0ubuntu0.14.10.2 [167 kB]
Del wpasupplicant 2.1-0ubuntu4.1 [815 kB]
Del xserver-xorg-video-intel 2:2.99.914-1~exp1ubuntu4.3 [723 kB]
Del linux-generic 3.16.0.37.38 [1,842 B]
Del liboxideqt-qmlplugin 1.6.5-0ubuntu0.14.10.1 [163 kB]
Del account-plugin-twitter 0.12+14.10.20140924-0ubuntu2 [2,416 B]
Del usb-creator-common 0.2.62ubuntu0.3 [23.7 kB]
Del liboxideqtcore0 1.6.5-0ubuntu0.15.04.1 [26.7 MB]
Del libcurl3-gnutls 7.37.1-1ubuntu3.4 [188 kB]
Del liboxideqtcore0 1.6.5-0ubuntu0.14.10.1 [26.9 MB]
Del libgail-3-0 3.12.2-0ubuntu15.3 [21.6 kB]
Del account-plugin-flickr 0.12+14.10.20140924-0ubuntu2 [2,732 B]
Del account-plugin-google 0.12+14.10.20140924-0ubuntu2 [3,478 B]
Del mysql-common 5.5.43-0ubuntu0.14.10.1 [13.0 kB]
Del tcpdump 4.6.2-1ubuntu1.2 [371 kB]
Del account-plugin-facebook 0.12+14.10.20140924-0ubuntu2 [2,906 B]
Del oxideqt-codecs 1.6.5-0ubuntu0.14.10.1 [560 kB]
Del libaccount-plugin-google 0.12+14.10.20140924-0ubuntu2 [5,680 B]
Del linux-image-generic 3.16.0.37.38 [2,418 B]
Del libgtk-3-bin 3.12.2-0ubuntu15.3 [18.3 kB]
Del curl 7.37.1-1ubuntu3.4 [129 kB]
Del linux-headers-generic 3.16.0.37.38 [2,388 B]
Del liboxideqtquick0 1.6.5-0ubuntu0.14.10.1 [254 kB]
Del linux-libc-dev 3.16.0-37.49 [791 kB]
Del linux-image-extra-3.16.0-37-generic 3.16.0-37.49 [38.3 MB]
Del libnm-glib-vpn1 0.9.8.8-0ubuntu28.1 [14.3 kB]
Del linux-image-3.16.0-37-generic 3.16.0-37.49 [15.6 MB]
Del firefox 37.0.2+build1-0ubuntu0.14.10.1 [41.0 MB]
Del icedtea-7-jre-jamvm 7u79-2.5.5-0ubuntu0.14.10.2 [420 kB]
Del gir1.2-networkmanager-1.0 0.9.8.8-0ubuntu28.1 [35.5 kB]
Del empathy-common 3.8.6-0ubuntu13.1 [1,520 kB]
Del usb-creator-gtk 0.2.62ubuntu0.3 [23.4 kB]
Del linux-headers-3.16.0-37-generic 3.16.0-37.49 [736 kB]
Del firefox-locale-en 37.0.2+build1-0ubuntu0.14.10.1 [609 kB]
Del libmysqlclient18 5.5.43-0ubuntu0.14.10.1 [613 kB]
Del account-plugin-windows-live 0.12+14.10.20140924-0ubuntu2 [2,088 B]
Del mysql-server-core-5.5 5.5.43-0ubuntu0.14.10.1 [3,403 kB]
Del network-manager 0.9.8.8-0ubuntu28.1 [550 kB]
Del libnm-glib4 0.9.8.8-0ubuntu28.1 [79.8 kB]
Del oxideqt-codecs 1.6.5-0ubuntu0.15.04.1 [559 kB]
Del tzdata 2015d-0ubuntu0.14.10 [179 kB]
Del tzdata-java 2015d-0ubuntu0.14.10 [69.7 kB]
Del libcurl3 7.37.1-1ubuntu3.4 [197 kB]
Del libaccount-plugin-generic-oauth 0.12+14.10.20140924-0ubuntu2 [5,260 B]
Del mysql-client-core-5.5 5.5.43-0ubuntu0.14.10.1 [733 kB]
Del libnm-util2 0.9.8.8-0ubuntu28.1 [120 kB]
navin@navin:~$
--------------------------------------------------------------------------------------------------------------------------------------

Thanks in anticipation.
Navin Talati / 14-05-2015

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

I am going to provide some explanation to these commands, and also to the output that you gave.

1. uname -a
This command shows the version of the kernel that your system is currently running.
The string "3.19.0-17-generic #17-Ubuntu" shows that you are using the most current version (even not the standard version, but the proposed next one that is currently in test status)
The string "i686" at the end indicates that you are using the 32bit variant of the operating system

2. lsb_release -crid
This command show the release number and name of the operating system, in your case Ubuntu 15.04 vivid.

3. df -h
Shows disk usage, the important lines are those with real disk devices

Filesystem Size Used Avail Use% Mounted on
 /dev/sdb3 32G 27G 3.6G 89% /
 /dev/sdb1 2.7G 485M 2.1G 19% /boot
 /dev/sdb5 391G 215G 176G 56% /media/navin/HOME_STORE

/dev/sdb3 (your root file system) is already 89% full.
Total size 32 GB, used 27 GB, usage percentage 89%

4. df -i
similar to previous, but not showing disk size, but number of files on the partitions (which is another constraint)

Filesystem Inodes IUsed IFree IUse% Mounted on
 /dev/sdb3 2138112 867906 1270206 41% /
 /dev/sdb1 183264 382 182882 1% /boot
 /dev/sdb5 184559672 237347 184322325 1% /media/navin/HOME_STORE

Your root file system can hold 2.1 million files, and 400K are used - not critical in the moment. Cleanup actions for disk size will also reduce that amount.

5. dpkg -l | grep ' linux-i'
List all installed kernel packages.

Your output shows that there are 17 versions of the kernel packages installed (they come in pairs), plus remainders of three more (those that do not have ii but rc at the beginning of the line).
Removing gall obsolete versions of these package should free at least 2 GB of space. (more than 100 MB each)

6. dpkg -l | grep ' linux-h'
List all installed kernel header packages

Similar to previous, again 17 version, amounting to about 1 GB disk space (about 60 MB each)

7. apt-get --simulate autoremove
Simulate removal of unneeded packages

Shows 126 packages that seem not to be of any use (no info about space freed by that action)

8. apt-get --simulate autoclean
simulate removal of obsolete packages in the package cache

Shows around 120 MB used in the package cache for packages that are no more current.

++++++++++++++++++++++++

Summary:
You should clean up obsolete packages. This will free at least 10% disk space on your root file system.

If you need advice how to do this, no not hesitate to ask.

Revision history for this message
Navin Talati (n-m-talati) said :
#4

Sir,
Thanks a lot for giving such an informative detail and helping me in understanding the commands and helped me to understand what these command implies. Thanks a lot. I would like to have your advice further for the following TWO matters.

(A)
From above details, I understand that it is advisable to free the space by removing the unwanted and useless packages. For this should I give following commands?

(1) sudo apt-get clean

AND

(2)sudo apt-get autoremove

(B)
Can I use "GParted" a partition editor application to stretch/compress any of the linux partitions? I have some other HDD in my sysem in addition to that bearing Linux(Ubuntu). I usually detach other HDDs while installing the linux or making any basic alteration in the linux. Will this give me safe resultant situation (i.e.using "GParted" partition editor application)?

Thanks in anticipation.
Navin Talati

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

(A)

The two commands

sudo apt-get --purge autoremove
sudo apt-get autoclean

will remove some unneeded packages and delete some unneeded files from the package cache, but this is not everything that should be done. Also several kernel image and kernel header packages should be removed:

What is the output of the simulation command
apt-get --simulate purge ^linux-image-3.13.0.* ^linux-image-3.16.0.* ^linux-image-extra-3.13.0.* ^linux-image-extra-3.16.0.* ^linux-headers-3.13.0.* ^linux-headers-3.16.0.*

(B)

gparted is one of the tools that help reizing partitions.
You have to be aware that you cannot resize a partition that is in use. So you have to boot from another medium, e.g. into an Ubuntu live system from an installation lit, that you can try resizing your hard disk partitions.

Revision history for this message
Navin Talati (n-m-talati) said :
#6

Replies as per #5
(A). The output of simulation command

"apt-get --simulate purge ^linux-image-3.13.0.* ^linux-image-3.16.0.* ^linux-image-extra-3.13.0.* ^linux-image-extra-3.16.0.* ^linux-headers-3.13.0.* ^linux-headers-3.16.0.*"

is as under:

-------------------------------------OUTPUT------------------------------------
navin@navin:~$ apt-get --simulate purge ^linux-image-3.13.0.* ^linux-image-3.16.0.* ^linux-image-extra-3.13.0.* ^linux-image-extra-3.16.0.* ^linux-headers-3.13.0.* ^linux-headers-3.16.0.*
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-3.13.0-40-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-29-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-47-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-46-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-44-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-34-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-33-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-32-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-30-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-48-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-38-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-37-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-36-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.13.0-35-generic' for regex '^linux-image-3.13.0.*'
Note, selecting 'linux-image-3.16.0-37-generic' for regex '^linux-image-3.16.0.*'
Note, selecting 'linux-image-3.16.0-36-generic' for regex '^linux-image-3.16.0.*'
Note, selecting 'linux-image-3.16.0-34-generic' for regex '^linux-image-3.16.0.*'
Note, selecting 'linux-image-3.16.0-33-generic' for regex '^linux-image-3.16.0.*'
Note, selecting 'linux-image-extra-3.13.0-48-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-47-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-37-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-46-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-36-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-35-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-44-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-34-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-33-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-32-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-30-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-29-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-38-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.13.0-40-generic' for regex '^linux-image-extra-3.13.0.*'
Note, selecting 'linux-image-extra-3.16.0-37-generic' for regex '^linux-image-extra-3.16.0.*'
Note, selecting 'linux-image-extra-3.16.0-36-generic' for regex '^linux-image-extra-3.16.0.*'
Note, selecting 'linux-image-extra-3.16.0-34-generic' for regex '^linux-image-extra-3.16.0.*'
Note, selecting 'linux-image-extra-3.16.0-33-generic' for regex '^linux-image-extra-3.16.0.*'
Note, selecting 'linux-headers-3.13.0-29-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-46-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-44-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-32-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-40-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-30-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-29' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-30' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-32' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-33' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-34' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-35' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-36' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-37' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-38' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-40' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-44' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-46' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-48-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-38-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-47-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-37-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-36-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-35-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-34-generic' for regex '^linux-headers-3.13.0.*'
Note, selecting 'linux-headers-3.13.0-33-generic' for regex '^linux-headers-3.13.0.*'
Package 'linux-headers-3.13.0-47-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-37-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-29-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-30-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-40-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-44-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-32-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-48-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-38-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-33-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-36-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-46-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-34-generic' is not installed, so not removed
Package 'linux-headers-3.13.0-35-generic' is not installed, so not removed
Note, selecting 'linux-headers-3.16.0-37-generic' for regex '^linux-headers-3.16.0.*'
Note, selecting 'linux-headers-3.16.0-36-generic' for regex '^linux-headers-3.16.0.*'
Note, selecting 'linux-headers-3.16.0-34' for regex '^linux-headers-3.16.0.*'
Note, selecting 'linux-headers-3.16.0-36' for regex '^linux-headers-3.16.0.*'
Note, selecting 'linux-headers-3.16.0-37' for regex '^linux-headers-3.16.0.*'
Note, selecting 'linux-headers-3.16.0-34-generic' for regex '^linux-headers-3.16.0.*'
Note, selecting 'linux-headers-3.16.0-33-generic' for regex '^linux-headers-3.16.0.*'
Package 'linux-headers-3.16.0-33-generic' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  breeze breeze-cursor-theme breeze-icon-theme frameworkintegration hddtemp
  java3ds-fileloader kde-base-artwork kde-cli-tools kde-cli-tools-data
  kde-style-breeze kde-style-breeze-qt4 kde-wallpapers-default kded5 kdesudo
  kinit kio-extras kio-extras-data kscreen ksysguardd ktexteditor-data
  kwin-style-breeze libaudclient2 libcddb2 libcln6 libdee-qt5-3
  libdirac-encoder0 libgit2-22 libgnome-media-profiles-3.0-0 libhttp-parser2.1
  libhud-client2 libid3tag0 libimlib2 libkdecorations2-5
  libkdecorations2private5 libkf5baloo1 libkf5balooxapian1 libkf5dnssd-data
  libkf5dnssd5 libkf5emoticons-data libkf5emoticons5 libkf5filemetadata-data
  libkf5filemetadata3 libkf5idletime5 libkf5jsembed-data libkf5jsembed5
  libkf5newstuff-data libkf5newstuff5 libkf5notifyconfig-data
  libkf5notifyconfig5 libkf5plasma5 libkf5plasmaquick5 libkf5prison1
  libkf5pty-data libkf5pty5 libkf5runner5 libkf5screen6 libkf5style5 libkf5su5
  libkf5sysguard5-data libkf5texteditor5 libkf5threadweaver5
  libkf5waylandclient5 libkf5waylandserver5 libkf5webkit5
  libkf5xmlrpcclientprivate5 libkfontinst5 libkfontinstui5 libksgrd5
  libkworkspace5-5 liblivemedia23 libllvm3.5 libopts25
  libplasma-geolocation-interface5 libprocesscore5 libprocessui5 libqalculate5
  libqalculate5-data libqimageblitz4 libresid-builder0c2a libsidplay2
  libssh2-1 libtaskmanager5 libtool-bin libupnp6 libusageenvironment1 libvlc5
  libvlccore7 libweather-ion7 libwxbase2.8-0 libwxgtk-media2.8-0 libwxgtk2.8-0
  libxcb-composite0 libxcb-damage0 libxmmsclient6 milou ntp
  oxygen-cursor-theme oxygen-sounds plasma-desktop plasma-desktop-data
  plasma-framework plasma-workspace python-wxgtk2.8 python-wxversion
  python3-notify2 python3-pexpect python3-pil python3-pyqt4 python3-pyqt5
  python3-renderpm python3-reportlab python3-reportlab-accel python3-sip
  qdbus-qt5 qml-module-org-kde-extensionplugin
  qml-module-org-kde-kquickcontrols qml-module-org-kde-kquickcontrolsaddons
  qml-module-org-kde-solid qml-module-qtquick-controls
  qml-module-qtquick-controls-styles-breeze qtdeclarative5-kf5declarative
  qtdeclarative5-kf5solid texlive-luatex ttf-oxygen-font-family
  ubuntu-release-upgrader-qt vlc-data
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  linux-headers-3.13.0-29* linux-headers-3.13.0-30* linux-headers-3.13.0-32*
  linux-headers-3.13.0-33* linux-headers-3.13.0-34* linux-headers-3.13.0-35*
  linux-headers-3.13.0-36* linux-headers-3.13.0-37* linux-headers-3.13.0-38*
  linux-headers-3.13.0-40* linux-headers-3.13.0-44* linux-headers-3.13.0-46*
  linux-headers-3.16.0-34* linux-headers-3.16.0-34-generic*
  linux-headers-3.16.0-36* linux-headers-3.16.0-36-generic*
  linux-headers-3.16.0-37* linux-headers-3.16.0-37-generic*
  linux-image-3.13.0-29-generic* linux-image-3.13.0-30-generic*
  linux-image-3.13.0-32-generic* linux-image-3.13.0-33-generic*
  linux-image-3.13.0-34-generic* linux-image-3.13.0-35-generic*
  linux-image-3.13.0-36-generic* linux-image-3.13.0-37-generic*
  linux-image-3.13.0-38-generic* linux-image-3.13.0-40-generic*
  linux-image-3.13.0-44-generic* linux-image-3.13.0-46-generic*
  linux-image-3.13.0-47-generic* linux-image-3.13.0-48-generic*
  linux-image-3.16.0-33-generic* linux-image-3.16.0-34-generic*
  linux-image-3.16.0-36-generic* linux-image-3.16.0-37-generic*
  linux-image-extra-3.13.0-29-generic* linux-image-extra-3.13.0-30-generic*
  linux-image-extra-3.13.0-32-generic* linux-image-extra-3.13.0-33-generic*
  linux-image-extra-3.13.0-34-generic* linux-image-extra-3.13.0-35-generic*
  linux-image-extra-3.13.0-36-generic* linux-image-extra-3.13.0-37-generic*
  linux-image-extra-3.13.0-38-generic* linux-image-extra-3.13.0-40-generic*
  linux-image-extra-3.13.0-44-generic* linux-image-extra-3.13.0-46-generic*
  linux-image-extra-3.13.0-47-generic* linux-image-extra-3.13.0-48-generic*
  linux-image-extra-3.16.0-33-generic* linux-image-extra-3.16.0-34-generic*
  linux-image-extra-3.16.0-36-generic* linux-image-extra-3.16.0-37-generic*
0 upgraded, 0 newly installed, 54 to remove and 2 not upgraded.
Purg linux-headers-3.13.0-29 [3.13.0-29.53]
Purg linux-headers-3.13.0-30 [3.13.0-30.55]
Purg linux-headers-3.13.0-32 [3.13.0-32.57]
Purg linux-headers-3.13.0-33 [3.13.0-33.58]
Purg linux-headers-3.13.0-34 [3.13.0-34.60]
Purg linux-headers-3.13.0-35 [3.13.0-35.62]
Purg linux-headers-3.13.0-36 [3.13.0-36.63]
Purg linux-headers-3.13.0-37 [3.13.0-37.64]
Purg linux-headers-3.13.0-38 [3.13.0-38.65]
Purg linux-headers-3.13.0-40 [3.13.0-40.69]
Purg linux-headers-3.13.0-44 [3.13.0-44.73]
Purg linux-headers-3.13.0-46 [3.13.0-46.79]
Purg linux-headers-3.16.0-34-generic [3.16.0-34.47]
Purg linux-headers-3.16.0-34 [3.16.0-34.47]
Purg linux-headers-3.16.0-36-generic [3.16.0-36.48]
Purg linux-headers-3.16.0-36 [3.16.0-36.48]
Purg linux-headers-3.16.0-37-generic [3.16.0-37.49]
Purg linux-headers-3.16.0-37 [3.16.0-37.49]
Purg linux-image-extra-3.13.0-29-generic [3.13.0-29.53]
Purg linux-image-3.13.0-29-generic [3.13.0-29.53]
Purg linux-image-extra-3.13.0-30-generic [3.13.0-30.55]
Purg linux-image-3.13.0-30-generic [3.13.0-30.55]
Purg linux-image-extra-3.13.0-32-generic [3.13.0-32.57]
Purg linux-image-3.13.0-32-generic [3.13.0-32.57]
Purg linux-image-extra-3.13.0-33-generic [3.13.0-33.58]
Purg linux-image-3.13.0-33-generic [3.13.0-33.58]
Purg linux-image-extra-3.13.0-34-generic [3.13.0-34.60]
Purg linux-image-3.13.0-34-generic [3.13.0-34.60]
Purg linux-image-extra-3.13.0-35-generic [3.13.0-35.62]
Purg linux-image-3.13.0-35-generic [3.13.0-35.62]
Purg linux-image-extra-3.13.0-36-generic [3.13.0-36.63]
Purg linux-image-3.13.0-36-generic [3.13.0-36.63]
Purg linux-image-extra-3.13.0-37-generic [3.13.0-37.64]
Purg linux-image-3.13.0-37-generic [3.13.0-37.64]
Purg linux-image-extra-3.13.0-38-generic [3.13.0-38.65]
Purg linux-image-3.13.0-38-generic [3.13.0-38.65]
Purg linux-image-extra-3.13.0-40-generic [3.13.0-40.69]
Purg linux-image-3.13.0-40-generic [3.13.0-40.69]
Purg linux-image-extra-3.13.0-44-generic [3.13.0-44.73]
Purg linux-image-3.13.0-44-generic [3.13.0-44.73]
Purg linux-image-extra-3.13.0-46-generic [3.13.0-46.79]
Purg linux-image-3.13.0-46-generic [3.13.0-46.79]
Purg linux-image-3.13.0-47-generic
Purg linux-image-3.13.0-48-generic
Purg linux-image-3.16.0-33-generic
Purg linux-image-extra-3.16.0-34-generic [3.16.0-34.47]
Purg linux-image-3.16.0-34-generic [3.16.0-34.47]
Purg linux-image-extra-3.16.0-36-generic [3.16.0-36.48]
Purg linux-image-3.16.0-36-generic [3.16.0-36.48]
Purg linux-image-extra-3.16.0-37-generic [3.16.0-37.49]
Purg linux-image-3.16.0-37-generic [3.16.0-37.49]
Purg linux-image-extra-3.13.0-47-generic
Purg linux-image-extra-3.13.0-48-generic
Purg linux-image-extra-3.16.0-33-generic
navin@navin:~$
---------------------------------------------------------------------------------------------------------

(B).
O.K., what I understood is
@---> that I can not re-size the partitions of ubuntu from ubuntu ( as I have ubuntu installed on my HDD and wants to resize the partitions of the same HDD on which linux is installed). Am I right?

@---> that I can resize the partitions of ubuntu bearing HDD using Installation CD of ubuntu (I have 14.04 LTS dvd/cd) making this medium First Bootable and proceeding (at the same time I should detach all other HDDs except that with Ubuntu - Is it?)

@---> that alternatively I can do the same thing after booting from another HDD bearing Window-7 and using GParted tool (I think GParted can also be used in windows.

Thank you sir for continuously explaining all the main and peripheral issues of the question.
Thanks a lot.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

(A)
The simulation of the command looks as expected (removes all kernel packages except the current 3.19.* versions)

So I recommend that you execute the commands

sudo apt-get purge ^linux-image-3.13.0.* ^linux-image-3.16.0.* ^linux-image-extra-3.13.0.* ^linux-image-extra-3.16.0.* ^linux-headers-3.13.0.* ^linux-headers-3.16.0.*
sudo apt-get autoremove
sudo apt-get autoclean

They will clean up obsolete packages.

afterwards re-issue the commands
df -h
df -i

to see the usage percentage of your hard disk after that action.

(B)
it is not strictly required to detach all other hard disks when trying to modify the partitions, but it is a very good idea to do that. It will eliminate the risk of an inadvertent change of the wrong disk.

I never tried using gparted in Windows to access a Unix-formatted hard disk. It might be possible that this is not possible at all.

Revision history for this message
Navin Talati (n-m-talati) said :
#8

Many thans for the quick response.
(A)
I will do as per your suggestion and shell let you know result there of. Ofcourse, I shell do this first and let us see how much actual space gets free as a result of this operation.
Then onward I may go for the next alternative (as per B) to see or to learn the effect.

(B)
I would like to have your opinion, if I follow the procedure as under.

In my system, there is a 40 GB HDD installed with Lubuntu 14.04 just as a spare. I today also installed “Gparted” which is found showing all the HDDs along with detail of partitions in each. According to that, the partitions detail of 1TB HDD (having Ubuntu 15.04) is as under:

/dev/sda1 ----------> ext4, Size 2.79GB, Used 594 MB, Unused 2.21 GB, boot
/dev/sda3 ----------> ext4, Size 32.60GB, Used 27.43GB, Unused 5.17 GB
/dev/sda4 ----------> swap Size 11.17GB Used 0.0 B Unused 11.17 GB

/dev/sda2 ----------> extended 885 GB
    /dev/sda7 -------> ext4 Size 148.74 GB Used 21.47 GB Unused 127.27 GB
    /dev/sda5 –-----> ntfs Size390.63 GB Used 214.90 GB Unused 175.73GB
    /dev/sda6 -------> ntfs Size 345.57GB Used 129.56 GB Unused 153.00 GB

Now my actual intension is to keep my Data partitions (sda5 & sda6, both ntfs) UNTOUCHED. Only I want to increase the space in sda3 (ext4), a “/ (root)” partition by compressing sda7 (ext4). May also cause changes in sda1 (ext4) and sda4(swap) to perform this operation. This I want to do for the reason that in future if I install new applications/softwares/tools etc. I shell not face the shortage of space. Otherwise I may have to go for fresh installation which again become very laborious for me to reinstall all the existing apps! There are very little data in sda7 (ext4) which I may transfer to any of the ntfs type partitions (sda5 or sda6). Actually while I installed a fresh ubuntu 14.04 LTS (before a year), at that time also I kept both ntfs partitions untouched. Now I want to RESIZE partition “/” to say 100 GB and the required space will be drained from sda7, an extended “/home” partition.

While doing this using Gparted, I shell detach all the HDDs except above 1TB and 40GB on which Lubuntu with Gparted tool exists. So from 40GB HDD, changes will be made on 1TB HDD. Will this do well and safe?

YOUR VALUABLE OPINION IS REQUESTED ALONG WITH APPROPRIATE SUGGESTIONS IF ANY

Thanks in anticipation with high regards.
Navin Talati / 18-05-2015

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

The amount of work required for resizing the partitions very much depends on the sequence of the partitions in your hard disk.
You have to be aware that each partition has to be contiguous. If you want to increase the size of a partition, you have to create free space immediately in front or behind that partition to extend the partition.
This is true for the primary partitions sda1, sda3 and sda4, but also for the extended partition sda2 itself, and again for the partitions inside the extended partition sda5, sda6 and sda7.

If sda7 is the last partition inside sda2, and if sda3 is behind sda2, it might be possible to shrink sda7 and shrink sda2 to get free space between sda2 and sda3 that then can be used to extend sda3.

To see the exact sequence of partitions please provide the output of the terminal command

sudo fdisk -l

recommended reading: https://help.ubuntu.com/community/HowtoPartition and the pages linked from there.

Revision history for this message
Navin Talati (n-m-talati) said :
#10

(A)
This has reference to (A) of #7.
Sir, the results are really very good. As per your recommendations, I applied the following commands in the given sequence.

sudo apt-get purge ^linux-image-3.13.0.* ^linux-image-3.16.0.* ^linux-image-extra-3.13.0.* ^linux-image-extra-3.16.0.* ^linux-headers-3.13.0.* ^linux-headers-3.16.0.*
sudo apt-get autoremove
sudo apt-get autoclean

And the OUTPUTs of "df -h" AND "df -i" BEFORE and AFTER the purging, removing and cleaning of obsolete packages are as under for the comparison:
--------------------------------------------------------------------------------------------
OUTPUT OF df -h AND df -i
BEFORE PURGING, REMOVING AND CLEANING

navin@navin:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 405M 6.4M 398M 2% /run
/dev/sda3 32G 27G 3.6G 89% /
tmpfs 2.0G 168K 2.0G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda1 2.7G 485M 2.1G 19% /boot
tmpfs 405M 64K 405M 1% /run/user/1000
/dev/sr0 459M 459M 0 100% /media/navin/Maxei
navin@navin:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 209524 677 208847 1% /dev
tmpfs 214727 928 213799 1% /run
/dev/sda3 2138112 872404 1265708 41% /
tmpfs 214727 10 214717 1% /dev/shm
tmpfs 214727 7 214720 1% /run/lock
tmpfs 214727 15 214712 1% /sys/fs/cgroup
/dev/sda1 183264 382 182882 1% /boot
tmpfs 214727 33 214694 1% /run/user/1000
/dev/sr0 0 0 0 - /media/navin/Maxei
navin@navin:~$

OUTPUT OF df -h AND df -i
AFTER PURGING, REMOVING AND CLEANING

navin@navin:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 405M 42M 363M 11% /run
/dev/sda3 32G 23G 7.9G 75% /
tmpfs 2.0G 172K 2.0G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda1 2.7G 42M 2.5G 2% /boot
tmpfs 405M 60K 405M 1% /run/user/1000
/dev/sr0 459M 459M 0 100% /media/navin/Maxei
navin@navin:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 209524 678 208846 1% /dev
tmpfs 214727 943 213784 1% /run
/dev/sda3 2138112 489541 1648571 23% /
tmpfs 214727 11 214716 1% /dev/shm
tmpfs 214727 7 214720 1% /run/lock
tmpfs 214727 15 214712 1% /sys/fs/cgroup
/dev/sda1 183264 302 182962 1% /boot
tmpfs 214727 32 214695 1% /run/user/1000
/dev/sr0 0 0 0 - /media/navin/Maxei
navin@navin:~$
-----------------------------------------------------------------------------------------

(B)
This has reference to #9.
Accordingly, the output of "sudo fdisk -l" is as under:
-----------------------------------------------------------------------------------------
navin@navin:~$ sudo fdisk -l
[sudo] password for navin:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000333ba

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 5855231 5853184 2.8G 83 Linux
/dev/sda2 97652734 1953503999 1855851266 885G f W95 Ext'd (LBA)
/dev/sda3 5855232 74215423 68360192 32.6G 83 Linux
/dev/sda4 74215424 97650687 23435264 11.2G 82 Linux swap / Solaris
/dev/sda5 409593303 1228795784 819202482 390.6G 7 HPFS/NTFS/exFAT
/dev/sda6 1228795848 1953503999 724708152 345.6G 7 HPFS/NTFS/exFAT
/dev/sda7 97652736 409591807 311939072 148.8G 83 Linux

Partition table entries are not in disk order.
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x9e309e30

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 63 512007614 512007552 244.1G 7 HPFS/NTFS/exFAT
/dev/sdb2 512007615 1953503999 1441496385 687.4G f W95 Ext'd (LBA)
/dev/sdb5 512007678 1843201709 1331194032 634.8G 7 HPFS/NTFS/exFAT
/dev/sdb6 1843201773 1953503999 110302227 52.6G 7 HPFS/NTFS/exFAT

Partition 2 does not start on physical sector boundary.

Partition 3 does not start on physical sector boundary.

Partition 6 does not start on physical sector boundary.

Partition 7 does not start on physical sector boundary.

Disk /dev/sdc: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x12131212

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sdc2 206848 206645247 206438400 98.4G 7 HPFS/NTFS/exFAT
/dev/sdc3 206645248 312578047 105932800 50.5G 7 HPFS/NTFS/exFAT

Disk /dev/sdd: 37.3 GiB, 40020664320 bytes, 78165360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00056cc6

Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 77119487 77117440 36.8G 83 Linux
/dev/sdd2 77121534 78163967 1042434 509M 5 Extended
/dev/sdd5 77121536 78163967 1042432 509M 82 Linux swap / Solaris

navin@navin:~$
---------------------------------------------------------------------------------------

From GParted user interface (i.e. display window of this partition editor), the sequence (from Left to Right) is as under :

sda1, sda3, sda4, sda7, sda5, and sda6 which is same as that in #8. This seems to be favourable situation as I understand from your above explanation in #9.

Thanks in anticipation.

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

Reordering the partitions in their real order and adding details:

Device Boot Start End Sectors Size Id Type
 /dev/sda1 * 2048 5855231 5853184 2.8G 83 Linux /boot
 /dev/sda3 5855232 74215423 68360192 32.6G 83 Linux /
 /dev/sda4 74215424 97650687 23435264 11.2G 82 Linux swap / Solaris
 /dev/sda2 97652734 1953503999 1855851266 885G f W95 Ext'd (LBA)
 /dev/sda7 97652736 409591807 311939072 148.8G 83 Linux
 /dev/sda5 409593303 1228795784 819202482 390.6G 7 HPFS/NTFS/exFAT
 /dev/sda6 1228795848 1953503999 724708152 345.6G 7 HPFS/NTFS/exFAT

sda3 and sda7 are not adjacent to each other. Any attempt to use space from sda7 to enlarge sda3 need a lot of moving partitions around.

You could gain 11 GB for sda3 by the following, which requires only a small amount of actions:
shrink sda7 by 11 GB, use the gained space for creating a new swap partition inside the extended partition (probably sda8), delete the current swap partition sda4 and extend sda3 to use the space currently used by sda4.

You have to be aware that there is a high risk of data loss if you mistype a command in gparted, so I recommend doing such action only if you are sure that you need to do it. And I strongly recommend caring for a good and complete backup.

Revision history for this message
Navin Talati (n-m-talati) said :
#12

OK, Sir.
Nice analysis you have provided in addition to step-by-step guidance.
Presently I postponed the activity of using GParted tool.
First I shell study the content in the recommended reading as in #9 ---> https://help.ubuntu.com/community/ How to Partition and the pages linked from there and then will think to do something if essentially required.
So at present, I got my issue mostly resolved and also could obtain the guideline for future.

ONE LAST REQUEST :-
Sir, please give a little brief of the command line meaning or about what it implies, when ever you reply my questions in future on this launchpad.net platform and oblige me.

VERY SINCERE THANKS to YOU - Mr. Manfred Hampl
Best Regards.

Navin Talati / 19-05-2015