Page 1 of 1

Cannot change size swap file

Posted: Mon Aug 17, 2020 1:27 pm
by KeesBl
I’ve installed DietPi without UI on a 4 Gb micro sd. It runs on a PI model B. I want to decrease the size of the swap file. This is what I do:
log in as root
dietpi-drive_manager
select / and press <enter>
I go to the option: Swap file : [X] |1822 Mib used. Select to change size.
I press <enter> and I get:
Failed: Insufficient free space /, a minimum of 2 Gb is required (527 Mib is available).
The only thing I can do is press <enter>. Then I am back in the previous menu. Type a number ore using the space bar doesn’t help.
What to do?

Re: Cannot change size swap file

Posted: Mon Aug 17, 2020 1:42 pm
by Joulinar
Hi,

many thank's for your request. Short question. What do you like to archive? Do you like to change size or disable SWAP?

you could try following

Code: Select all

/boot/dietpi/func/dietpi-set_swapfile 512 # Sets swap size to 512 MiB
/boot/dietpi/func/dietpi-set_swapfile 0 # Removes the swap file completely