Score:0

How Do I Decrease the Size of a Preexisting Swap File Without Removing it?

pt flag

After seeing this post: How do I increase swapfile in Ubuntu 18.04?, I was wondering, how do I decrease the size of the swap file without removing it?

stumblebee avatar
mx flag
Why the need to decrease the size of a swapfile without removing it? What exactly are you trying to accomplish?
in flag
Decreasing a swapfile would be done the same way as creating one, as they’re fixed in size to begin with. The only difference is that you would specify a smaller size than currently exists.
Score:1
cn flag

how do I decrease the size of the swap file without removing it?

This question is rather irrelevant. Swap space must be taken out of use before changing it. The command sudo fallocate -l 4G /swapfile (with an adjusted size) will overwrite your existing swapfile if you do not delete it first.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.