Tracking Down Wasted Disk Space in Linux using Agedu

If you're a Linux user, managing disk space is essential to system maintenance. However, identifying the files and directories that are taking up larger amounts of space can be a stressful task. That's where Agedu comes in. Agedu is an important tool that can help you track down wasted disk space on your Linux system.

In this article, you'll be informed through installing and using Agedu to identify the directories and files that are taking up the most space on your Linux system. By the end of this article, you will be able to optimize your disk space by removing unnecessary files and directories, which can improve the performance and reliability of your Linux system.

Agedu, which is pronounced as "age dee you," is a free and open-source utility that serves a similar purpose as the du command. With Agedu, system administrators can easily locate old files that are consuming significant disk space and decide whether to delete or move them to free up space on their systems. In other words, Agedu is a valuable tool for tracking down and managing wasted disk space on Linux systems.

Features of Agedu

Agedu is a simple, yet powerful tool that can help you identify wasted disk space on your Linux system. Some of the features of Agedu include

  • Web-based interface for easy visualization of disk usage

  • Ability to scan multiple directories

  • Sorting of directories by size

  • Display of the percentage of total disk space used by each directory

  • Option to exclude certain directories from the scan

  • Age-based analysis to identify files that haven't been accessed recently

How Does Agedu Work?

Agedu works by scanning the directories you specify and creating a database of files and directories sorted by their size and access time. It then calculates the percentage of total disk space used by each directory and displays this information in an easily understandable format. The key advantage of Agedu over traditional tools like du is its ability to factor in file age helping you identify not just large files, but large files that haven't been accessed recently.

Essentially, it helps you visualize which files or directories are taking up the most space on your system and determines their relevance based on recent usage patterns. By knowing which files or directories are consuming the most disk space without being actively used, you can make informed decisions on what to delete or archive to free up disk space.

How to Install Agedu in Linux Systems?

Installing Agedu in Linux is a very straightforward process. Here's how to do it

Step 1: Update Package Lists

To begin, launch the terminal and update your current package list by executing the following command

sudo apt-get update

Here is the terminal output

Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Fetched 329 kB in 1s (366 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

Step 2: Install Agedu

To install Agedu, simply execute the command below

sudo apt-get install agedu

Here is the terminal output

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  agedu
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 156 kB of archives.
After this operation, 512 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y

Tracking Wasted Disk Space in Linux with Agedu

Now that Agedu is successfully installed, let's take a look at how we can use this tool to track down any wasted disk space on our Linux system.

Step 1: Navigate to Target Directory

To scan a specific directory, start by opening the terminal and navigating to the desired location. For instance, if you want to scan the home directory, enter the following command in the terminal

cd ~

Here is an example of the output

user@hostname:~$

Step 2: Scan Directory with Agedu

To scan a specific directory using Agedu, simply run the following command

agedu -s .

Here is an example of the output

Built pathname index, 12847 entries, 564617 bytes of index
Faking directory atimes
Building index
Final index file size = 1024576 bytes

By using the -s option with Agedu, you can scan the current directory (.) and create an index database. If you want to scan a specific directory, you can replace the "." with the path of that directory. The scan process creates a database file that Agedu uses to generate reports.

Step 3: Generate HTML Report

Once Agedu has finished scanning the directory, you can generate a report in HTML format using the following command

agedu -w

This command starts a web server that you can access through your browser. Here is an example of the output

Server running on port 8080
URL: http://localhost:8080/

Alternatively, you can generate a static HTML report using

agedu -H /path/to/directory > report.html

After running the web server command, Agedu will start a local web server that you can access by opening http://localhost:8080 in your web browser. The web interface provides an interactive way to explore disk usage, with clickable directory trees and age-based color coding.

Understanding Agedu Output

The report generated by Agedu will list directories in descending order of their size, along with additional information such as

Column Description
Size Total disk space used by the directory
Files Number of files in the directory
Age Color Visual indication of how recently files were accessed
Percentage Percentage of total scanned space

The age-based color coding helps you identify directories containing old, potentially unused files that are good candidates for cleanup. Red indicates recently accessed files, while blue represents older, potentially stale files.

Advanced Agedu Usage

Excluding Directories

You can exclude specific directories from the scan using the --exclude option

agedu -s /home --exclude=/home/user/.cache

Command Line Text Output

For a quick text-based summary, you can use the -t option

agedu -t /path/to/directory

Conclusion

Agedu is an excellent tool for tracking down wasted disk space on Linux systems by combining size analysis with file age information. Its web-based interface makes it easy to identify large directories containing old, unused files that are prime candidates for cleanup. With its straightforward installation process and powerful visualization capabilities, Agedu is a must-have tool for system administrators and Linux users who want to manage their disk space effectively.

Updated on: 2026-03-17T09:01:39+05:30

285 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements