{"id":61579,"date":"2023-12-10T12:58:48","date_gmt":"2023-12-10T11:58:48","guid":{"rendered":"https:\/\/ekiwi-blog.de\/61579\/linux-delete-all-partitions-on-a-hard-drive-or-ssd\/"},"modified":"2023-12-10T12:58:48","modified_gmt":"2023-12-10T11:58:48","slug":"linux-delete-all-partitions-on-a-hard-drive-or-ssd","status":"publish","type":"post","link":"https:\/\/ekiwi-blog.de\/en\/61579\/linux-delete-all-partitions-on-a-hard-drive-or-ssd\/","title":{"rendered":"Linux: Delete all partitions on a hard drive or SSD"},"content":{"rendered":"<p>Delete all partitions with one command.<\/p>\n<p><!--more--><\/p>\n<p>After my experiment with <a href=\"https:\/\/ekiwi-blog.de\/61520\/raid-spiegelung-in-windows-einrichten\/\">hard drive mirroring in Windows<\/a>, I wanted to use one of the SSDs for other purposes. However, it was only displayed as &#8220;Offline&#8221; in Windows. The attempt to reactivate it via the context menu did not work. The disk management simply stopped here.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_1.png\" alt=\"\" width=\"353\" height=\"169\" class=\"aligncenter size-full wp-image-61567\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_1.png 353w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_1-300x144.png 300w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_1-350x169.png 350w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/p>\n<h2>Erase hard drive under Linux<\/h2>\n<p>Well, if Windows is on strike, then Linux it is. So I started my Linux box and connected the hard drive via USB. First I used &#8220;lsblk&#8221; to see what name the hard drive was registered under.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_2.png\" alt=\"\" width=\"591\" height=\"401\" class=\"aligncenter size-full wp-image-61571\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_2.png 591w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_2-300x204.png 300w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><\/p>\n<p>The deletion is then carried out with the following command:<\/p>\n<pre>\r\nsudo dd if=\/dev\/zero of=\/dev\/sdb bs=512 count=1 conv=notrunc\r\n<\/pre>\n<p>This deletes the first small part of the disc that contains the partitioning information.<\/p>\n<p>All partitions were then deleted. To update the display, I had to disconnect and reconnect the hard drive once.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_3.png\" alt=\"\" width=\"566\" height=\"176\" class=\"aligncenter size-full wp-image-61575\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_3.png 566w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2023\/12\/part_3-300x93.png 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>Delete all partitions with one command.<\/p>\n","protected":false},"author":1,"featured_media":19418,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1555],"tags":[2443,1682],"class_list":["post-61579","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-en","tag-linux-en-2","tag-linux-en"],"_links":{"self":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/61579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/comments?post=61579"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/61579\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media\/19418"}],"wp:attachment":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media?parent=61579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/categories?post=61579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/tags?post=61579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}