SWAPOFF
Installé avec le paquet mount
Voir aussi : swapon
Afficher la version de la commande swapoff
swapoff --version
ou
apt-cache policy mount
Mode verbose
swapoff --verbose [...]
ou
swapoff -v [...]
Supprimer une partition swap de la mémoire swap disponible
swapoff swap-partition|swap-file
ex :
# swapon --show NAME TYPE SIZE USED PRIO /swapfile file 1.2G 0B -2 /dev/loop0 partition 100M 0B -3 /dev/loop1 partition 100M 0B -4 # swapoff -v /dev/loop0 swapoff /dev/loop0 # swapoff -v /swapfile swapoff /swapfile
Supprimer une partition swap de la mémoire swap disponible avec son UUID
swapoff -U uuid
ex :
# swapon --show NAME TYPE SIZE USED PRIO /swapfile file 1.2G 0B -2 /dev/loop0 partition 100M 0B -3 /dev/loop1 partition 100M 0B -4 # lsblk -o NAME,UUID,FSTYPE,MOUNTPOINT,MODEL,SIZE,LABEL NAME UUID FSTYPE MOUNTPOINT MODEL SIZE LABEL loop0 e0b0d285-d54e-4ade-ad45-da3cdbf19bc3 swap [SWAP] 100M loop1 a3b32f17-e129-4e00-95e2-01b161488627 swap [SWAP] 100M sda VBOX HARDDISK 25G └─sda1 04953580-e51d-4d29-9136-683a46f8609c ext4 / 25G sr0 2018-06-29-10-46-23-45 iso9660 /media/adminsys/VBox_GAs_5.2.14 CD-ROM 55.3M VBox_GAs_5.2.14 # swapoff -v -U a3b32f17-e129-4e00-95e2-01b161488627 swapoff /dev/loop1 # swapon --show NAME TYPE SIZE USED PRIO /swapfile file 1.2G 0B -2 /dev/loop0 partition 100M 0B -3
Supprimer une partition swap de la mémoire swap disponible avec son label
swapoff -L label