Analyze disk usage with Baobab
Cleanup

© Lead Image © Amy Walters, 123RF.com
Unnecessary files and directories take up valuable space on hard disks or SSDs. Baobab lets you locate and remove data garbage at the push of a button.
Computer mass storage is getting bigger and cheaper. With the rapidly increasing capacity of hard disks, SSDs, and USB sticks, users are tempted to store even more information (with some of it soon forgotten).
To find your way through the data jungle, Linux offers command-line tools like du
or df
. However, these tools do not provide detailed information on where data is stored or which files are the biggest space hogs.
Baobab [1], also known as Disk Usage Analyzer, is a graphical, menu-driven viewer, which lets you quickly track down obsolete data and identify space hogs. Baobab also lets you remove useless files without requiring massive search overhead.
You can find Baobab in the package sources of virtually all popular Linux distributions. It is easy to install using your distribution's package management tools. Some distributions, such as Ubuntu, automatically install Baobab.
Although the tool works with the GTK+ toolkit, Baobab also works with GTK desktops other than Gnome. After installation, the tool will appear in your desktop's menu hierarchy as Disk Usage Analyzer.
Windows
When launched, Baobab opens the Devices & Locations window, which shows all the drives available on your system, regardless of their mount status. Here you can see a drive's size and capacity to the right of the drive designation, as well as a colored bar beneath that shows total drive utilization at a glance (Figure 1).

Clicking on a displayed drive opens a two-paned window that shows the selected drive's directory hierarchy in a tree structure on the left. Baobab again uses colored bars to indicate utilization, which ranges from red (almost full) to yellow (partially full) to green (almost empty). If a small triangle appears in front of the directory name, clicking on it expands the view to the next hierarchy level. To the right of the directory tree structure and utilization bar graphs, you will find each level's absolute size and the number of objects it contains.
In the right pane, the drive's space allocation is shown as a multilayer pie chart, with each layer representing a further hierarchy level. If you mouse over the pie chart, Baobab temporarily displays the corresponding subdirectories and the occupied storage capacity (Figure 2).
If you click on another directory in the tree view on the left, the view also changes in the right window segment. Using the two buttons at the bottom of the right pane, you can switch from a pie chart (the button on the left) to a tile graph (button on the right). If the view appears too detailed (or too general for complex hierarchies), you can also use the context menu to zoom in or out.
Administration
Baobab not only provides insight into the data carriers' structure and assignments, but it also supports basic administrative tasks. When you right-click on a desired directory in the right pane, a context menu pops up that allows you to open the current working directory in the desktop's file manager, letting you work with its data. Alternatively, you can move a selected directory (including all its subdirectories) directly from Baobab to the trash can.
The left tree view also provides administrative task functions via a context menu, which you open by right-clicking on the desired directory. However, the only options available from this pane are for saving the file path to the clipboard, moving the directory with its subdirectories to the trash can, or opening the folder.
On computers with large volumes of data stored in deeply nested structures, it makes sense to work with individual folders. To do this, click on the Scan Folder… option (located under the hamburger icon drop-down list in the top-right corner of the drive view) and then select the desired folder in the file manager. After closing the dialog, Baobab displays the folder contents in the usual way, with the selected folder appearing as the root directory in the tree structure.
Removed
In addition to scanning locally mounted media, Baobab also supports media analysis and data cleanups on remote computers. To connect to an external computer, select Other Locations located bottom left in the Select Folder dialog box (Figure 3).
The file manager now displays other systems found on the local network. You can connect to the remote computer by clicking on its icon; if this does not work, enter the server address in the input field in the bottom right corner.
After pressing Connect, Baobab opens the corresponding connection. The software then switches back to the main window and displays the contents of the remote computer or server, which can be used just like local files and directories.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Direct Download
Read full article as PDF:
Price $2.95
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Find SysAdmin Jobs
News
-
MNT Seeks Financial Backing for New Seven-Inch Linux Laptop
MNT Pocket Reform is a tiny laptop that is modular, upgradable, recyclable, reusable, and ships with Debian Linux.
-
Ubuntu Flatpak Remix Adds Flatpak Support Preinstalled
If you're looking for a version of Ubuntu that includes Flatpak support out of the box, there's one clear option.
-
Gnome 44 Release Candidate Now Available
The Gnome 44 release candidate has officially arrived and adds a few changes into the mix.
-
Flathub Vying to Become the Standard Linux App Store
If the Flathub team has any say in the matter, their product will become the default tool for installing Linux apps in 2023.
-
Debian 12 to Ship with KDE Plasma 5.27
The Debian development team has shifted to the latest version of KDE for their testing branch.
-
Planet Computers Launches ARM-based Linux Desktop PCs
The firm that originally released a line of mobile keyboards has taken a different direction and has developed a new line of out-of-the-box mini Linux desktop computers.
-
Ubuntu No Longer Shipping with Flatpak
In a move that probably won’t come as a shock to many, Ubuntu and all of its official spins will no longer ship with Flatpak installed.
-
openSUSE Leap 15.5 Beta Now Available
The final version of the Leap 15 series of openSUSE is available for beta testing and offers only new software versions.
-
Linux Kernel 6.2 Released with New Hardware Support
Find out what's new in the most recent release from Linus Torvalds and the Linux kernel team.
-
Kubuntu Focus Team Releases New Mini Desktop
The team behind Kubuntu Focus has released a new NX GEN 2 mini desktop PC powered by Linux.