2

Ubuntu is my only OS. I recently downloaded many utilities for a lecture along with Visual Studio Code, and since then I have noticed unusual lag in my PC.

I cleared a lot of things using various tools like Bleach Bit and via terminal, yet, the lag still exists and opening applications is noticeably slower.

Here is a screenshot

Here is the text version of the screenshot.

I have space in my /home partition, I do not know if it is possible to reallocate sizes; is it practical?

I cannot use the swap partition as then I will have to unmount other partitions which includes home and root.

Edit: after applying the following commands, here is the screenshot of

enter image description here

10
  • 1
    Use top and free to diagnose the cause of lag. Use Disk Usage Analyzer or du to determine if you have unexpected space hogs on your Ubuntu partition.
    – user535733
    Mar 2, 2020 at 18:47
  • 1
    Both / and /home are too small and nearly full. You should reinstall and allocate more space. Mar 2, 2020 at 18:57
  • 1
    Kartikeya, ever since fall of 2017, the Linux kernel has improved the swap file performance so that the only frequent need for a swap partition is if you have added Hibernation to your system. Once we have the results of parted we can discuss removing the swap partition without affecting performance. For details, see help.ubuntu.com/community/SwapFaq
    – K7AAY
    Mar 2, 2020 at 19:08
  • 1
    Partition changes are the quickest way to lose data by accident. Therefore i'd suggest making an external backup of what's in /dev/sda2. After the backup completes, verify what's on the backup matches the source. Then, backup again to a different destination and verify again. You can use an external drive and/or space in the cloud for this process. Then, you can boot from an Ubuntu Live USB and make partition moves and changes. Oh, yes; what is in /dev/sda6 and why did you need to have it separate from /home?
    – K7AAY
    Mar 2, 2020 at 19:19
  • 1
    PS: Please move the question regarding Visual Studio into a new question as it's a separate issue.
    – K7AAY
    Mar 2, 2020 at 19:22

1 Answer 1

2

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Keep these things in mind:

  • always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

  • a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

  • a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

  • if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

  • you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Copy any last minute "few important images and documents" from sda6 to sda3 (as we'll delete sda6 (Elementary OS) later)

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

  • boot to a Ubuntu Live DVD/USB
  • start gparted
  • delete /dev/sda6 partition (this will remove Elementary OS)
  • resize the right side of /dev/sda8 /dev/sda7 and add ~40G to /dev/sda8 /dev/sda7
    • this leaves about 20G unallocated, which will get added to /dev/sda6 later
  • move /dev/sda8 /dev/sda7 partition all the way to the right
  • resize the right side /dev/sda7 /dev/sda6 all the way to the right
    • this adds about 20G to the /
  • click the Apply icon
  • reboot # reboot the computer
  • sudo update-grub # update GRUB since the /dev/sda6 deletion

Update #1:

After deleting /dev/sda6, gparted has renumbered partitions, and then /dev/sda7 became /dev/sda6, and /dev/sda8 became /dev/sda7. Follow the same instructions, substituting the new partition numbers.

Update #2:

Boot to Ubuntu Live DVD/USB again. Start terminal and type:

  • sudo fsck -f /dev/sda6
  • sudo fsck -f /dev/sda7
  • give me a new screenshot of gparted

Update #3:

sudo umount /dev/sda2 # unmount this partition

sudo ntfsfix -d /dev/sda2 # try to fix ntfs partition

Update #4:

If you don't have Users and Groups application already installed, install it this way...

sudo apt-get update

sudo apt-get install gnome-system-tools

Show me the advanced settings for your account. Upload a screenshot to imgur.com and give me the URL.

Create a new Administrative user named "Administrator". Log out of your current user and test the login for Administrator account.

Upload a copy of /etc/fstab to paste.ubuntu.com and give me the URL.

1

Not the answer you're looking for? Browse other questions tagged .