¿Falta la opción de argumento en sfdisk?

¿Falta la opción de argumento en sfdisk?
sfdisk --delete $disk

Desde Ubuntu 18.04 o posterior funciona. ¿Cuál es el comando equivalente en Ubuntu 16.04 LTS?

Ubuntu 16.04 LTS (--eliminar falta),

Ubuntu 18.04 LTS (--eliminar presente)

Respuesta1

Solución 1:compilar e instalar sfdisk desde las fuentes (para poder usar una versión más reciente)

wget https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.35/util-linux-2.35.tar.gz
tar -xvf util-linux-2.35.tar.gz
cd cd util-linux-2.35
./configure 
make
make install
/usr/local/bin/sfdisk --delete $disk

Solución 2:usarfdisk

# list disk and partitions
fdisk -l
# open the target disk with fdisk
fdisk /dev/target-disk
# then use the d command option to delete the partition you want to remove
# then use the w command option to save the changes 

Respuesta2

wipefs -a -f $disk

voluntadHaz el truco

información relacionada