Agedu – Utility for tracking down wasted disk space
In other words, agedu is a tool you might use to help you free up disk space. It lets you see which directories are taking up the most space, as du does; but unlike du, it also distinguishes between large collections of data which are still in use and ones which have not been accessed in months or years – for instance, large archives downloaded, unpacked, used once, and never cleaned up. Where du helps you find what's using your disk space, agedu helps you find what's wasting your disk space.
agedu has several operating modes. In one mode, it scans your disk and builds an index file containing a data structure which allows it to efficiently retrieve any information it might need. Typically, you would use it in this mode first, and then run it in one of a number of ‘query’ modes to display a report of the disk space usage of a particular directory and its subdirectories. Those reports can be produced as plain text (much like du) or as HTML. agedu can even run as a miniature web server, presenting each directory's HTML report with hyperlinks to let you navigate around the file system to similar reports for other directories.
Install Agedu on ubuntu
Open the terminal and run the following command
sudo apt-get install agedu
agedu [ options ] action [action...]
So you would typically start using agedu by telling it to do a scan of a directory tree and build an index.You can do this using the following command
$agedu -s /home/ubuntu
Output as follows
Built pathname index, 909 entries, 88764 bytes of index
Faking directory atimes
Final index file size = 225840 bytes
Note:- You have to replace /home/ubuntu with your own username
$ agedu -w
which will print (among other messages) a URL on its standard output along the lines of
Using Linux /proc/net magic authentication
Now paste that URL into your web browser, and you will be shown a graphical representation of the disk usage in /home/ubuntu and its immediate subdirectories, with varying colours used to show the difference between disused and recently-accessed data. Click on any subdirectory to descend into it and see a report for its subdirectories in turn; click on parts of the pathname at the top of any page to return to higher-level directories. When you've finished browsing, you can just press Ctrl-D to send an end-of-file indication to agedu, and it will shut down.
After that, you probably want to delete the data file agedu.dat, since it's pretty large. In fact, the command agedu -R will do this for you; and you can chain agedu commands on the same command line, so that instead of the above you could have done
$ agedu -s /home/ubuntu -w -R
for a single self-contained run of agedu which builds its index, serves web pages from it, and cleans it up when finished.
If you don't have a graphical web browser, you can do text-based queries as well. Having scanned /home/fred as above, you might run
$ agedu -t /home/ubuntu
which again gives a summary of the disk usage in /home/ubuntu and its immediate subdirectories; but this time agedu will print it on standard output, in much the same format as du. If you then want to find out how much old data is there, you can add the -a option to show only files last accessed a certain length of time ago. For example, to show only files which haven't been looked at in six months or more:
$ agedu -t /home/ubuntu -a 6m
That's the essence of what agedu does. It has other modes of operation for more complex situations, and the usual array of configurable options. The following sections contain a complete reference for all its functionality.
Check agedu Manpage for more Details using the following command