To make a Linux disk appear empty, write a new partition table with no partition entries:
printf 'label: gptn' | sudo sfdisk /dev/sdX
Replace /dev/sdX only after confirming the correct whole-disk device. This creates an empty GPT label; it does not securely erase the old files or every data sector. If your goal is sanitization for resale, disposal, or privacy, use a separate discard or overwrite procedure.
Choose what “remove all partitions” means
These outcomes are different and require different commands:
| Goal | What changes | What does not happen |
|---|---|---|
| Create an empty disk layout | A new partition table is written with zero partition entries. | Old filesystem contents are not overwritten. |
| Hide detectable signatures | Filesystem, RAID, or partition-table signature strings are removed. | wipefs does not erase the filesystem or other data. |
| Sanitize stored data | Data areas are discarded or overwritten, subject to device behavior. | A secure result cannot be assumed without checking the hardware and method. |
The procedure below covers the first goal: an empty partition table. Stop if you need secure erasure instead.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
1. Identify the correct whole disk
Writing a partition table to the wrong device can destroy another disk’s layout. Inspect names, models, sizes, filesystem types, and mount points first:
lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINTS
- A path such as
/dev/sdaidentifies a whole disk. - A path such as
/dev/sda1identifies a partition on that disk. - Use the model and size to match the physical disk you intend to clear; do not copy
/dev/sdXliterally. - The available output columns can vary with the installed
lsblkversion.
Before continuing, make sure the target’s partitions are unmounted and that the disk is not active as swap, RAID, an LVM physical volume, an encrypted backing device, or another storage subsystem. A mounted or otherwise busy device can reject the write or leave dependent services in an unsafe state.
2. Write an empty GPT partition table
After verifying the whole-disk path, run:
printf 'label: gptn' | sudo sfdisk /dev/sdX
The header-only input explicitly asks sfdisk to create a label without partition lines. Without that explicit label request, sfdisk does not create an empty table by default. The command changes partition metadata; it is not a sector-by-sector erase.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
GPT is a modern partition-table format. If the machine must support particular legacy firmware or operating systems, choose the label type required by that environment instead of assuming GPT is universally appropriate.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchAlternative: create the label with Parted
Parted also separates creating a disk label from creating partitions. Its mklabel operation can create a GPT label:
sudo parted /dev/sdX mklabel gpt
This is an alternative to the sfdisk command, not an additional required step. Do not run both casually on a disk containing data you may still need.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
3. Verify that the table is empty
Inspect the device again:
lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINTS
An empty table should show the whole disk without partition children. You can also ask a partitioning utility to print the disk’s layout. The expected result is a partition table label with no partition entries. Existing data sectors may still contain old filesystem contents, and the disk is not mountable as a usable volume until you create a partition and a filesystem.
Make the disk usable again
An empty label and a filesystem are separate layers:
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute- Create one or more partitions with a partitioning tool such as
fdisk,sfdisk, or Parted. - Create a filesystem on the selected partition with the filesystem-specific frontend, such as
mkfs.ext4for ext4. The genericmkfscommand recommends using the type-specificmkfs.<type>tools. - Mount the new filesystem and configure persistence only after confirming the new partition identifiers.
If you actually need to erase old data
Remove signatures only
wipefs can remove detectable filesystem, RAID, or partition-table signatures so they are no longer visible to tools such as libblkid. It does not erase the filesystem itself or other data on the device. On a whole disk, wipefs --all removes partition-table signatures; it should not be described as a secure wipe of the partitions’ contents.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Discard the device’s data areas
blkdiscard discards the specified device range and warns that the data is lost. Its secure mode requires support from the storage device; support and behavior vary by hardware. The utility also documents a --zeroout mode that writes zeros instead of issuing discard. Neither option should be presented as a guaranteed sanitization result for every SSD, HDD, USB device, virtual disk, or RAID layer.
Use a sanitization procedure only after identifying the exact device technology and requirements. A partition-table reset, signature removal, discard, and overwrite are not interchangeable, and none should be run on a disk that has not been positively identified.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common mistakes to avoid
- Using
/dev/sda1when the intention is to replace the entire disk table; partition numbers refer to individual partitions. - Assuming that an empty partition listing proves the old files are unrecoverable.
- Running
wipefsbecause its name sounds like a full erase. - Adding
--force, discard, or overwrite commands without first confirming the target and the required outcome. - Creating a new filesystem immediately after changing the table without checking that the kernel sees the intended device and partitions.
Frequently Asked Questions
Does creating an empty GPT table securely erase the disk?
No. It replaces partition metadata but does not overwrite all data sectors. Use a hardware-appropriate sanitization method when secure erasure is the actual requirement.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Can I use wipefs --all instead of sfdisk?
No. wipefs --all removes detectable signatures; it does not erase filesystem contents and is not the same operation as deliberately creating an empty GPT label.
Why does the command use /dev/sdX instead of a partition number?
The command writes a partition table for the whole disk. Names ending in a partition number, such as /dev/sda1, refer only to one partition.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

