Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

For example, de-fragmenting, disc cleanup, or stuff like that?

share|improve this question
add comment

5 Answers

up vote 18 down vote accepted

Not really. There is no need to defrag the disks, because they don't get fragmented unless you have like 99% of the disk full. There is no need for a cleanup, unless you are really low on space. Performance is not an issue, like in Windows. There is also no need to cleanup the registry, because Ubuntu doesn't have one.

However, some applications might need maintenance. For instance, Firefox databases might become bloated with time, so you need to vacuum them to keep the performance high. Any application that uses SQLite files can suffer from the same issue.

If you want to do cleanup, see ccleaner equivalent.

What I do to avoid wasting space is to always cleanup the apt cache. This is what I use when upgrading packages:

sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove

The first command cleanup the cache, the second update the software sources, the third upgrades necessary packages and the last one uninstall unnecessary software.

share|improve this answer
    
@lovinglinux How do you vacuum Firefox databases? –  DrKenobi Nov 10 '10 at 4:13
1  
@DrKenobi See firefox-tutorials.blogspot.com/2010/05/… –  lovinglinux Nov 10 '10 at 4:18
    
@lovinglinux Great! Thank you! –  DrKenobi Nov 10 '10 at 4:26
    
+1, for having written the database-optimization article I referred in my answer :-) –  nik Nov 10 '10 at 4:32
1  
Would also be useful to warn that your script starts with a killall firefox. No harm done -- there is session restore, but a heads-up is good. –  nik Nov 10 '10 at 4:39
show 2 more comments

You want to make regular backups of all important documents, that's the most important "regular maintenance" task there is. But of course you're already doing this... ;-)


Furthermore, you can use applications like Computer Janitor to clean up unneeded libraries, old kernels, etc.

In most cases fragmentation is not really a big issue, and in any case it won't harm you as much as it did in the old days. The files that are most likely to get fragmented are probably log files (which really isn't all that important; if you need them microseconds are not what you care about) and more in general when small chunks of data get written to several files in parallel. I wouldn't worry about this though, as long as you don't see filesystem performance degrade badly (my main desktop was installed in 2007 and upgraded ever since, and I don't see any performance issues, even if at some times both partitions have been quite full).

share|improve this answer
    
On a side note, I had an issue with UFW saving too much logs. The log file became huge in a matter of days, eating more than 8GB of space. So keep an eye on the logs. –  lovinglinux Nov 10 '10 at 4:39
2  
+1 for the mention of backups –  fluteflute Nov 10 '10 at 15:26
add comment

While you don't have to do regular cleanups, there may be times you want to cleanup unnecessary stuff to make some more disk space and lighten the system.

Check Cleaning up a Ubuntu GNU/Linux system at UbuntuGeek.
Update: also How do I free up disk space? here (as DrKenobi refers).


If you use firefox, there are addons like Vacuum Places Improved to optimize database.

I also prefer creating a tmpfs point for the entire firefox profile -- but that would be a matter of personal preference. As an additional advantage, this helps me maintain a profile backup -- just in case.

share|improve this answer
1  
To remove unnecessary stuff look at askubuntu.com/questions/5980/how-do-i-free-up-disk-space/… –  DrKenobi Nov 10 '10 at 4:17
    
Vacuum Places only vacuum the bookmark database. Firefox has several other databases and extensions can have them too. Best way in my opinion is to run a script to vacuum the entire profile folder. –  lovinglinux Nov 10 '10 at 4:23
    
@lovinglinux, yes, I had linked to that in the optimize database string :-) –  nik Nov 10 '10 at 4:24
    
Yeah, I saw after writing it :) BTW, I just added a warning to my tutorial about SQLite Optimizer. –  lovinglinux Nov 10 '10 at 4:34
add comment

For a typical Ubuntu user, here is what you can do :

  • use the Computer Janitor (System > Administration) to cleanup old packages and all use the apt-get command line tool to cleanup up unused packages
  • the Trash (bottom right corner of the screen) to cleanup deleted files
  • manual maintenance of your home (/home/~username) directory

Other than that, you don't need to defragment your hard drive, really. As for spywares and all, I never had any problem so far (for a typical user).

share|improve this answer
    
time and again I read warnings about Computer Janitor; so maybe that advice is outdated... –  nutty about natty Apr 29 '13 at 10:47
1  
This advice is outdated. It used to be good. However, I still use the default apt-get cleanup args once in a while. This answer dates back when Gnome2 was the preferred shell. –  Yanick Rochon Apr 29 '13 at 11:15
add comment

Nope, the nature of (and, a bit, obscurity of) Linux means defragmenting, registries, and viruses are not an issue. However, Linux does accumulate a bit of useless data which doesn't slow your computer down but does take up hard drive space (an issue if you're using an SSD). This is easy enough to fix - you can run 'apt-get autoremove' in a terminal to remove unneeded packages, and/or install Ubuntu Tweak from the software center or terminal:

sudo apt-get install ubuntu-tweak

which is generally a great tool to have under your belt anyways. It has a janitor feature that can automatically detect and, when selected, clean up your old kernels, unneeded packages, browser caches, and more.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.