Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

15.2.3. Removing a Swap File

To remove a swap file:

Procedure 15.5. Remove a swap file

  1. At a shell prompt, execute the following command to disable the swap file (where /swapfile is the swap file):
    # swapoff -v /swapfile
  2. Remove its entry from the /etc/fstab file.
  3. Remove the actual file:
    # rm /swapfile