# /usr/sbin/swap -d /path/filename
The swap file name is removed so that it is no longer available for swapping. The file itself is not deleted.
# rm /path/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.
For information on mounting a file system, see Chapter 18, Mounting and Unmounting File Systems (Tasks).
# swap -l
Example 20-2 Removing Unneeded Swap Space
The following examples shows how to delete the /files/swapfile swap file.
# swap -d /files/swapfile # (Remove the swap entry from the /etc/vfstab file) # rm /files/swapfile # swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 136,1 16 1638608 1600528