I have installed/un-installed many packages(as trial) in My System as a result they leave a lot of junk and temporary files...Is there any package or software that can scan for removable junk and remove it out of my system??
-
Possible duplicate; http://askubuntu.com/questions/389026/what-trusted-file-cleaning-tools-are-available-for-ubuntu – fleamour Jun 10 '14 at 11:28
-
nope I just need to save the space that is left over after removing a package – Chinmaya B Jun 10 '14 at 11:31
3 Answers
I'd recommend using the
find -name [filename]
This does not delete the files but the find command will help find the directory tree(s) of the files you are looking for.

- 581
-
actually I don't know exact file names that's why I need a package which can scan whole drive and get junk for me..... – Chinmaya B Jun 10 '14 at 11:29
-
You can use wildcards if you are not familiar with the exact name. Example: find -name "*example.sh" – ryekayo Jun 10 '14 at 11:30
You can always do a find / |xargs ls -l --time=atime 2>/dev/null >/tmp/access.times
. With that, you have a file /tmp/access.times which contains every file on your system with the last access time.
You can sift through it to find files that are barely accessed and see what can be removed. I'd still be careful before removing things that you actually need, so don't script and automate this process or you'll get problems!

- 1,016
- 1
- 12
- 25
If you remove packages using apt-get purge
, then system-wide configurations and stuff like that will be deleted. However, users configuration files will not. This situation has been improved in later years, because of XDG specs. For instance, Liferea will store its cache in ~/.cache/liferea/
, its databases in ~/.local/share/liferea/
and its configuration in ~/.config/liferea/
. That's how its supposed to be done now, making it much easier to figure out which files are no longer used. However, some apps don't follow this scheme yet.
I don't know of any scanner that does this automatically and in many cases, it wouldn't even make sense, because you can share your home between many different computers, having different applications installed – meaning the fact that you don't have a certain app installed right now, doesn't mean you don't use it on other computers.
Perhaps you'd like to use find
to see which files haven't been used in a certain amount of time. Of course, an app could be created that used these different things to provide a map of things you might want to clean up. That would be nice, but I've never heard of any such tool.

- 29,531
-
please give the exact command 'find' or syntax by which I can find my files – Chinmaya B Jun 15 '14 at 19:09
-
No, that's way out of scope for this question and you'll surely want to familiarize yourself with the "find" command anyway, because it's a tremendously useful tool. It's not difficult although it may seem to be. – Jo-Erlend Schinstad Jun 16 '14 at 00:22