18

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

5 Answers 5

17

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.

5
  • @lovinglinux How do you vacuum Firefox databases?
    – DrKenobi
    Nov 10, 2010 at 4:13
  • 1
    @DrKenobi See firefox-tutorials.blogspot.com/2010/05/… Nov 10, 2010 at 4:18
  • +1, for having written the database-optimization article I referred in my answer :-)
    – nik
    Nov 10, 2010 at 4:32
  • BTW, I just added a warning to my tutorial about SQLite Optimizer. Please read it. Nov 10, 2010 at 4:35
  • 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, 2010 at 4:39
6

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).

1
  • 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. Nov 10, 2010 at 4:39
0

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.

4
  • 1
    To remove unnecessary stuff look at askubuntu.com/questions/5980/how-do-i-free-up-disk-space/…
    – DrKenobi
    Nov 10, 2010 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. Nov 10, 2010 at 4:23
  • @lovinglinux, yes, I had linked to that in the optimize database string :-)
    – nik
    Nov 10, 2010 at 4:24
  • Yeah, I saw after writing it :) BTW, I just added a warning to my tutorial about SQLite Optimizer. Nov 10, 2010 at 4:34
0

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).

2
  • time and again I read warnings about Computer Janitor; so maybe that advice is outdated... Apr 29, 2013 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. Apr 29, 2013 at 11:15
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .