marți, 9 aprilie 2013

How to clean up Ubuntu

How to clean up Ubuntu - Easy Linux tips project

This is Tux, the official mascot of Linux

Ubuntu 12.10 Quantal Quetzal has been released!

A star of the Ubuntu family: Xubuntu!

16days until
Ubuntu 13.04 Raring Ringtail

Release schedule of Ubuntu 13.04 Raring Ringtail

How to clean up Ubuntu


Back to the home page


Never use cleaning applications like Bleachbit or Computer Janitor! They are very risky and may damage your system beyond repair. There are a few safe cleaning actions, which I'll describe below.

Ubuntu doesn't get polluted much over time. It even doesn't need defragmentation. The only cleaning actions you might want to do in Ubuntu, are the following:

Clear the updates cache

1. Use Ubuntu Software Center to install Synaptic Package Manager.

Click on the grey Ubuntu logo (Dash home). Query: synaptic.
Click on Synaptic Package Manager

Settings - Preferences - Files

Put the dot at: Delete downloaded packages after installation

Press the button: Delete cached package files

Remove unused remains of uninstalled software

2. Still in Synaptic Package Manager:

In the lower left corner of the Synaptic window, click on the button Status.
Then, in the upper left corner, click the following line:
Not installed (residual config)

Mark all shown packages for complete removal and click Apply.

Clear the thumbnail cache

3. For each shown picture, Ubuntu automatically creates a thumbnail, for viewing in the file manager.

Over time, the number of thumbnails can increase dramatically. Moreover, the thumbnail cache will eventually contain many superfluous thumbnails of pictures that don't exist anymore.

My advice is therefore, to clear the thumbnail cache every six months or so. The quickest way is to use the terminal:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Type (use copy/paste to avoid errors):
rm -f ~/.thumbnails/normal/*


Press Enter.

You can permanently limit the size of the thumbnail cache as follows:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Type:
dconf-editor

Press Enter

Note: in 12.04 you have to install the package dconf-tools first (not necessary in 12.10).

In dconf-editor, click on the small triangle to expand a category. Like this, click your way to:
org - gnome - desktop - thumbnail_cache
.... and set the maximum-age to 90 (press Enter) and the maximum-size to 64 (press Enter again).

Close dconf-editor.

(continued in the column on the right)


This website is being sponsored by Google Ads.

Are you using an ad blocker? Then you're also blocking my earnings from advertisements....

If you wish to support this website, you can (temporarily?) switch off your ad blocker. Thanks in advance....


Remove old kernels

4. After a kernel update, the old kernel still shows in the Grub boot menu, under the header: "Previous Linux versions" (In Ubuntu 12.10 this header is called "Advanced options for Ubuntu"). Because you might want to start your machine with the old kernel, if the new kernel doesn't function well.

So far, so good. But having more than one redundant kernel, is superfluous and a waste of disk space. This is how you can remove old kernels and thereby clean up the Grub boot loader menu as well:

An Ubuntu version sticks to the main kernel version it had on release date. Kernel updates are only minor versions of that main version.

For example: Ubuntu 12.04 was first released with 3.2.0-23. It will always remain 3.2.0, but the minor version number receives regular updates.

Now let's get started (based on the example of 12.04):

Click on the grey Ubuntu logo (Dash home). Query: synaptic.
Click on Synaptic Package Manager.

query:
kernel 3.

(use the Search button and not the buggy Quick search)

Mark all installed kernels that you want to remove, for "complete removal". You should find that each kernel version has at least three installed packages; remove all three of them (usually two headers packages and one image package). Press the Apply button in the panel.

Tip: leave the newest redundant old kernel intact, just to be on the safe side.

Now reboot your computer. The Grub menu should be cleansed.

Ready! That's all you ever need to do. Doing more is risky and not advisable.

Note: don't use cleaning applications like Computer Janitor. They are dangerous and at best nearly useless.

The registry

5. There's no need to clean the registry of Linux, as it can't get polluted in the first place. For the following reasons:

- Only the operating system itself has a central registry. The configurations of the applications aren't in there, because they don't have access to it. So they can't mess it up. They place their own default settings in their own folders in the system.

- applications place upon installation a hidden settings file in the personal folder of each user. That's the only settings file that a user has access to. More or less like MS-DOS did, when each application only created it's own .ini file with it's settings.

- each user has his own hidden copy of the central registry in his personal folder. That copy is the only thing that he can mess up, not the registry of another user account.

Want more?

Do you want more tips and tweaks for Ubuntu? There's a lot more of them on this website! For example 10 fatal mistakes that you'll want to avoid in Ubuntu.


To the content of this website applies a Creative Commons license.


Comentarii