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.

Does Ubuntu need regular cleanups like Windows. For example:

  • Cleaning the logs
  • Temporary files
  • Package cache
  • Dependencies left over

I am not referring to web browsers only.

In case I never do a cleanup, will I have a system like new without my hard drive being full of temporary files, packages, etc.?

Will the performance degrade overtime if a cleanup is not done.

share|improve this question
add comment

6 Answers 6

up vote 35 down vote accepted

File Cleaning / Space Saving / Privacy

Just to give an idea, taking Windows as base. In windows you need to do a cleanup mostly every week if not every day (I use as an example the fact that I worked in over 30 cyber cafes which are in total more than 500+ PCs. The work the got from users made having to cleanup everyday a typical job.). In Ubuntu, this cleanup is actually not needed so often, but if you actually need to do it you have several command line tools like apt-get or aptitude that do a nice cleaning and GUI tools like ubuntu tweak that also do this. The cleanup for Ubuntu can be done every 6 to 12 months. Yes that is right, every so many months you can do it or in my case every 2 or 3 years.

This really depends on the amount of work you put the PC through. When I say work I mean, downloading files, moving files, creating files, deleting or copying files. All of this on a daily basis. Most Windows users know that the performance of any Windows degrades really fast if no optimizations are done. I have had cases where the user has gone a full year with no need to optimize anything and had other cases where the user had to literally format the PC after a month. It depends on the computer usage. The 1 year guy used the computer for word processing and internet only. The 1 month used it to download a lot of stuff, music, videos, games, deleted some, moved some, etc.. In all of this time, both did not do any optimizations.

In Ubuntu you do get a performance degradation, but from experience you need to:

  1. Install many services that also create many files (LAMP Server, Mail Server, FTP Server, etc..). The performance will go down for about 5%. At least for a full year, that is all that will happen. You might see more performance lose but you need to wait a lot (Like a 3 to 5 year wait). The immediate downside is the booting time and shutting time since you have services running that need to close client connections and such. Apart from that, there won't be a slowness as known in Windows.

  2. Install many programs (Video Editors, Sound Editors, Games, etc..). Similar to the performance drop when installing services but not so much so. You can even install programs up to a point of using 99.99% of the hard drive space and Ubuntu will not create a performance drop. At least I tested this with Wine games and OpenGL games to see if they got hit with a performance drop using an HDD almost full.

If by performance and space wasted you are worry, then you can do the check every year or two since you will not be wasting a lot of space. Performance wise, Ubuntu (or any other distro for that matter) is not influence in performance by the amount of garbage left behind in the system that fills the HDD. That is a Windows problem not a Linux one where, if you get around 25% to 35% of the space left, the system starts slowing down (Shown more in Windows XP than in Vista or 7/8). Anyway, like I said before, having a 99.99% hard drive full of stuff will not slow you down. The only thing is you would need to clean your logs which are found in /var/log. This will increase overtime and the folder will hold many Megabytes or Gigabytes of information depending on the amount of time and the services installed. For a 6 month cycle, I get around 20MB in the log folder.

If you are really paranoid you have this command:

(Only if you have aptitude installed)

sudo aptitude clean - Will erase downloaded packages from cache
sudo aptitude autoclean - Will erase old downloaded packages from cache

(Use apt-get which already comes by default)

sudo apt-get clean - Will erase downloaded packages from cache
sudo apt-get autoclean - Will erase old downloaded packages from cache

For GUI based

Ubuntu Tweak

sudo add-apt-repository ppa:tualatrix/next  
sudo apt-get update  
sudo apt-get install ubuntu-tweak

and then run ubuntu-tweak and there is an option called Janitor which is used for spring cleaning as seen in the picture:

enter image description here

You can also remove old compress log files from the system

sudo rm -v /var/log/*.gz

Lastly there is a GUI Tool (Thank Uri in the comment for this. I forgot):

BleachBit

enter image description here

BleachBit is an advance cleaning utility for Ubuntu (Similar to CCleaner) and other distros that really, REALLY cleans the system. You can find it in the Software Center just by searching for bleach. What makes it different from the Ubuntu Tweak is that it searches for many common folders that many apps use to store cache/temp files. Apart from that improves a little bit the performance of browsers (since it cleans them out too) and libreoffice. There are a lot of more stuff BleachBit does but go to the site for more info. +1 Uri for the reminder.

Note that this is usually done every so many months or years, not everyday or every week like in Windows. Linux and Ubuntu have a unique way of always been optimized for this type of "problems". And before you ask, Fragmentation in Ubuntu is a very hard thing to do. Fragmentation at the level we see in Windows takes many months, even years so a fragmentation of 2 months in Windows (And the slowness that comes with it) is roughly like 2 or 3 years in Linux (and even then is not slowed down like in Windows).

For a general check I have 2 1TB hard drives, one is 0.91% non-contiguous and the other is OMG!! 1.2% non-contiguous... after 2 years of everyday, constant use. So am guessing in 2050 I will eventually have to "defragment" the hard drive, unless I bought a new one or formatted the existing one ;).

For Energy Efficiency

For battery performance, it is known that the following tools do help:

Powertop

It can save several minutes/hours of battery usage, increasing life of battery and performance of it.

To install: sudo apt-get install powertop

To run: sudo powertop

enter image description here

Jupiter

(NOT available/needed since 13.04) Recommended reading Is there a power saving application similar to Jupiter? It manages much better the battery usage and it gives longer battery time.

sudo add-apt-repository ppa:webupd8team/jupiter  
sudo apt-get update  
sudo apt-get install jupiter

To run: Type jupiter in Dash or use the Jupiter Applet icon in the top panel.
enter image description here

TLP

It is a good power management tool to monitor Watt usage:

To install:

sudo add-apt-repository ppa:linrunner/tlp  
sudo apt-get update  
sudo apt-get install tlp

To run: Just reboot, it will start as a service.

The only downside is that you need to tweak the configuration file in order to get the most out of your battery, but using tools like powerstat can let you know easily if you are optimizing it right or wrong.

share|improve this answer
1  
Luis, you're why I come here...to learn. –  lqlarry Nov 20 '11 at 19:48
2  
Computer Janitor is evil... Bleachbit is far better. –  Uri Herrera Nov 20 '11 at 21:52
2  
OMG Uri I forgot about that one and its the one I installed in 3 PCs last week. Lol. Thanks will Add. –  Luis Alvarado Nov 20 '11 at 22:24
1  
It's an exaggeration to suggest Windows needs cleaning 'mostly every week if not every day'. You can promote Ubuntu without having to make unnecessary (and incorrect) comparisons. –  bcbc Nov 22 '11 at 21:09
1  
A computer in a cyber cafe and a normal single-user Windows computer are not comparable. But that certainly clarifies your response. –  bcbc Nov 23 '11 at 19:00
show 4 more comments

Cleaning is not necessary, but for the meticulous among us it's highly recommended ;)

  • apt cache can grow quite quickly, especially when a lot of new kernels are being installed
  • buggy applications can leave a file here and there, and make a mess in the filesystem. For example on my 10.10 system I have a few dozen ~/.recently-used.xbel.XXXXX and ~/.org.chromium.XXXX useless files.
  • Uninstalled applications often leave their config files in your home directory.
  • If there is a problem in your system, logs can grow huge - check the size of the /var/log and ~/.xsession-errors.
  • More often than not it is the user who leaves a lot of junk everywhere. Open up the Baobab disk space analyzer or any such to get an idea what has accumulated on your disk over time.
  • all the thumbnails get stored and are never cleared up even though you've deleted those pictures or will never use that photo CD again.
  • if there's a filesystem problem, your lost+found directory can grow too

An Ubuntu system does a good job of cleaning everything unnecessary, but from time to time the administrator has to weigh in...

share|improve this answer
    
Thank you very much! –  Paul Nov 22 '11 at 10:42
add comment

An apt-get clean to remove old package download archives once in a while doesn't go amiss, I'm not sure there's anything that does that automatically.

Logs will be handled for you by logrotate.

/tmp is cleaned out for you on every reboot.

share|improve this answer
add comment

actually, it does need cleaning up, quite often in my opinion, the best app for that is bleach bit, its a little like the famous CCleaner on windows, Bleachbit is in the software centre

cleans up your firefox cache, apt cache, empties trash etc etc, it should come peinstalled in ubuntu to be honest, if you have been running your system a while, you could potentally free up hundreds of MBs on first run of bleachbit

Bleachbit

share|improve this answer
    
I have to disagree Jayo, since 5.04 I have not found the need (Not talking about Ubuntu only here) to do a clean up quite often as the experience I had in Windows. In my case, using Firefox for the 6 month period that I have used it before formatting/installing/upgrading to the next version of Ubuntu has only gotten me about 2GB to 3GB of garbage space. This, without doing any cleaning of any sort and accumulating all download updates without deleting them afterwards (Including log an browser cache). Comparing this to about 15GB in Windows in the same time period that is about 80% less. –  Luis Alvarado Nov 22 '11 at 16:49
    
i didn't at all say that the garbage accumulated in ubuntu was near the level of windows, I mentioned that bleachbit was similar to ccleaner (www.piriform.com/ccleaner) on windows, in what they do. after a first run of bleach bit, it will free up 100 or more mbs, every time. but its other functions is to clear caches of firefox and thumbnails, localizations etc. its great for privacy too, in the case of cleaning browser caches, which cleans out cookies and flash cruft also, it worth running at least once a month in my opinion –  Jayo Nov 22 '11 at 16:59
    
Don't worry I am only talking about the frequency of cleaning. In my case the frequency is null since by the time the new version comes out there is no need for a clean up. –  Luis Alvarado Nov 22 '11 at 17:19
1  
fair enough,but in my expirience privacy wise its worth running often, and also the less garbage hanging around my home folder the better, as it does seem like a swifter system in my opinion, if your system doesn't slow down with a few gbs of junk in it thats cool –  Jayo Nov 22 '11 at 17:48
    
+1 for the privary wise in there. True that. –  Luis Alvarado Nov 22 '11 at 19:23
add comment

hello IMHO ubuntu does need that too with time pass you install/remove things lets say you ll have some config files that you dont need anymore beside that some orphane packages of course some thumbs ... , you can try bleachbit

share|improve this answer
2  
apt-get autoremove will get rid of leftover packages (packages which were installed as a dependency of something else, but that something else has since gone) –  Caesium Nov 20 '11 at 17:47
    
@Caesium i do agree with you but sometime juste like now im havin this menu entry that doesnt want to disapear even with all my autoremove and purge :P –  kosaidpo Nov 20 '11 at 20:55
add comment

Ubuntu and other flavors of Linux don't really need cleaning up as you might do in Windows. Over time, of course, you might accumulate things on your computer that you might not wish to keep - old documents, no-longer-used programs, etc. - but there is nothing really akin to the Windows registry that simply builds up clutter that slows your computer. The old stuff you save won't slow down your computer: it will probably run as fast a year from now as it does today.

I go through things from time to time to keep things neat and clean, because I like being organized, and that includes getting rid of old stuff. However, unless I decide to change settings or remove startup programs or something like that, my neatness obsession doesn't affect my computer's performance.

share|improve this answer
    
Thanks for the answer!!! –  Paul Nov 22 '11 at 10:41
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.