Page 1 of 1

How to properly delete swap?

Posted: Sat Sep 05, 2015 7:45 am
by renzor
I want to remove my swap I created during initial installation but I'd like to know what's the proper method to do it so it won't effect my current setup. Anyone?

Re: How to properly delete swap?

Posted: Sat Sep 05, 2015 7:51 am
by Cosmo.
First question is, if this is a good idea at all. Open a terminal, press F11 and enter

Code: Select all

inxi -Fxz
than paste the output here.

The other question is what you can do with the space you make free. A screenshot of the drive with Gparted would help to see this. You can either install gparted in your system or launch the live system, where it is pre-installed.

Re: How to properly delete swap?

Posted: Sat Sep 05, 2015 8:00 am
by renzor
thank you

Re: How to properly delete swap?

Posted: Sat Sep 05, 2015 8:17 am
by Cosmo.
You only answered my questions partly, so we do not know, how big your swap is and where it is located.

I would even with this amount of RAM not remove swap entirely, but reduce it to e.g. 1 GB. If there is no swp at all and you should at any time come into the situation where the system needs to swap, but cannot, your session would irrecoverably stall.

For doing this launch your live system. Open gparted, right click the swap partition and choose unswap. Then you can reduce the size (also with gparted).

Re: How to properly delete swap?

Posted: Sat Sep 05, 2015 8:20 am
by renzor
Cosmo. wrote:You only answered my questions partly, so we do not know, how big your swap is and where it is located.

I would even with this amount of RAM not remove swap entirely, but reduce it to e.g. 1 GB. If there is no swp at all and you should at any time come into the situation where the system needs to swap, but cannot, your session would irrecoverably stall.

For doing this launch your live system. Open gparted, right click the swap partition and choose unswap. Then you can reduce the size (also with gparted).
Currently away from comp, but swap is 4gb wouldn't mind reducing to 1gb...actual location is /dev/sdb7 from memory. Also, do you mean swapoff? If it is, already did this a little while back. How would I be able to reallocate space (let's say 3gb, so 1gb swap) to /home?

Re: How to properly delete swap?

Posted: Sat Sep 05, 2015 8:25 am
by BlackVeils
yes they meant swap-off. you may not be able to use the extra space for /home or the system partition. we would need to see the disk layout. so either take a screenshot of gparted, to show us, or paste the output from this command run in the terminal program:

Code: Select all

sudo parted -l
thats a lower case L at the end.

Re: How to properly delete swap?

Posted: Sat Sep 05, 2015 9:05 am
by renzor
BlackVeils wrote:yes they meant swap-off. you may not be able to use the extra space for /home or the system partition. we would need to see the disk layout. so either take a screenshot of gparted, to show us, or paste the output from this command run in the terminal program:

Code: Select all

sudo parted -l
thats a lower case L at the end.
thank you

Re: How to properly delete swap?

Posted: Sat Sep 05, 2015 11:08 am
by Cosmo.
Yes, I wrote "unswap" out of my remembrance and you understood it yourself right; BlackVeils confirmed this already.

The drive layout looks good. If you reduce the size of sdb7, make sure, that you drag in the graphical settings on the left side. This allows you to enhance the size of sdb6 = /home in the next step and have the additional 3 GB there.

Enhancing the size of a partition is in general a rather save operation. But it is an operation, which in worst case also go wrong. So I strongly recommend to make a backup of your home on an external drive.