View Full Version : [ubuntu] disk defragmentation and disk cleanup

February 22nd, 2009, 08:06 AM
hey every1...
how do u defragment and clean up your disks in linux? windows is quite easy.. but i dont know how to do it in linux...
also.. i thought i could defragment my ubuntu drive frm vista itself but for sum reason.. the linux drive doesn't even show up!! is ther sumtin i can do about that?

February 22nd, 2009, 08:08 AM
You don't need either one.

February 22nd, 2009, 08:13 AM
every 25 times you boot your linux box, it will automatically check your drive for errors and such...so don't have to worry,,,leave your windows habits behind, this is linux...;)

February 22nd, 2009, 08:17 AM
nice...linux rox in that case.. lol

Crafty Kisses
February 22nd, 2009, 08:31 AM
You don't really have to defrag in Linux, the file system is organized and stored more efficiently than a Windows box. If you really want to then I can suggest you go to something like Google and search "Linux defrag" or something and grab a utility, they do exist, but unnecessary.

There is an option to "clean" though, just run this command in Terminal:

sudo apt-get clean

February 22nd, 2009, 08:40 AM
Just to elaborate a bit on the above, running "sudo apt-get clean" removes package files that Ubuntu's package manager has stored in it's cache when installing programs. Doing this will free some disk space.

February 22nd, 2009, 10:29 AM
The Linux drive does not show up in Windows because windows can not read the ext2 / ext3 file system used by Linux without installing a 3rd party driver.

Ubuntu Linux can read the Windows NTFS or FAT32 file system by default

February 22nd, 2009, 10:47 AM
Check out this thread (http://ubuntuforums.org/showthread.php?t=140920), it should give you some tips for cleaning up. As for defragmenting, like the others have said its not required.

February 22nd, 2009, 11:41 AM
you can clean ubuntu with BleachBit (google it)

February 22nd, 2009, 12:08 PM
nice...linux rox in that case.. lol

Just another reason to love Linux/Ubuntu. It took a bit getting used to for me but its great not having to run defrag programs, anti-virus', or anti spyware all the time.


March 14th, 2009, 04:08 PM
nice...linux rox in that case.. lol

Linux DOES rox. Do what I did, man. Give Windows the bird, and let Linux take up all of your hard drive space. Resistance is futile.


March 19th, 2009, 03:36 AM
How about an external hard drive? Most of the files were placed on the drive from my use in Windows.

March 19th, 2009, 03:55 AM
Its really more to the linux filesystems. Ext2/3/4 jfs xfs all are good at reducing fragmentation as there block allocation policys are better than NTFS and fat32.

March 22nd, 2009, 09:53 PM
How about an external hard drive? Most of the files were placed on the drive from my use in Windows.

External drives will probably need defragging, most external drives use NTFS or Fat32.
If you plan on ditching windows its best just to reformat your external to a linux filesystem such as ext3.

March 22nd, 2009, 10:23 PM
4 off topic posts removed.

March 29th, 2009, 06:02 PM
I have around 20,000 Pics in my home-directory, when i delete them, i HAVE to defrag...

So - how?