sfdiskにパラメータオプションはありませんか?

sfdiskにパラメータオプションはありませんか?
sfdisk --delete $disk

Ubuntu 18.04以降で利用可能です。 Ubuntu 16.04 LTSでは、そのコマンドは何ですか?

Ubuntu 16.04 LTS(--欠落除去)

Ubuntu 18.04 LTS(--既存の削除)

ベストアンサー1

解決策1:ソースからsfdiskをビルドしてインストールする(最新バージョンが利用可能)

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

解決策2:使用fdisk

# 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 

おすすめ記事