As the best space cleaner, Mac Cleaner is capable of deleting various types of junk files to get more space for your Mac. Or delete apt cache in its entirety (frees more disk space): sudo apt-get clean. Either remove only the outdated packages, like those superseded by a recent update, making them completely unnecessary. It’s important to keep in mind that if you run the eraseDisk command, the target disk is going to lose all its data, so make sure you are erasing the proper disk. Mac Cleaner is the best Mac space cleaning software to remove junk files, memory, virus, adware, malware, duplicated photos, and uninstall applications to free up storage and speed up Mac performance. Now, you have two ways to clean the APT cache. The syntax is going to look like this: Diskutil eraseDisk JHFS+ Empty /dev/disk5s2
CLEAN DISK CMD MAC OS
Let’s say the disk I want to erase has “/dev/disk5s2” as its identifier and I’m going to use Mac OS Extended Journaled (JHFS+) as the system format type and name it “Empty”. This is the syntax we need: Diskutil eraseDisk FILESYSTEM DISKNAME DISKIDENTIFIER Then pick a name and a system format type. Once you have found the proper drive to erase, just copy its identifier so you can use it for the next command. This is going to list all the mounted drives on your Mac. Start off by running the following command in the command line: Diskutil list The free space indicated in diskpart means 'space. Note that disk 5 is the disk we need to clean. This will list all the hard drives in the system. At the prompt, type 'diskpart' and hit Enter.
Right-click on 'Command Prompt' and choose 'Run as Administrator'. Here I'll show you how you can erase and format a disk using the command line. Open the Start menu and go to 'Accessories'. To do that, the only thing you need is a bit of precise syntax to make sure that you are erasing the proper disk. But some Mac users might need to erase them from the command line on Mac OS. Most users use Disk Utility to erase a disk or hard drive.