Become superuser.
Use the swap -d command to remove swap space.
# /usr/sbin/swap -d /path/filename |
The swap file name is removed from the list so that it is no longer available for swapping. The file itself is not deleted.
Edit the /etc/vfstab file and delete the entry for the swap file.
Recover the disk space so that you can use it for something else.
# rm swap-filename |
If the swap space is a file, remove it. Or, if the swap space is on a separate slice and you are sure you will not need it again, make a new file system and mount the file system.
See Chapter 28, Mounting and Unmounting File Systems (Tasks) for more information.
The following examples shows how to delete the /files/swapfile swap file.
# swap -d /files/swapfile # swap -l swapfile dev swaplo blocks free /dev/dsk/c0t2d0s1 32,17 8 205624 192720 |