1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

Tutorial Clean up and optimize ubuntu 12.10 quantal quetzal, ubuntu server and any version

Discussion started by Draft, Apr 11, 2013.

Thread Status:
Not open for further replies.
  1. Draft

    Draft Administrator Staff Member Administrator

    For cleaning up Ubuntu 12.10 , you can use GUI applications like ubuntu tweak and/or bleachbit and with baobab to check disk space but I prefer to use the terminal.


    Here are the commands That I use to save space and clean up all ubuntu 12.10 versions ( Ubuntu, Lubuntu, Xubuntu … )


    Cleaning up Ubuntu using the terminal


    Let’s start by checking the occupation of disk space you can use the command


    df -a


    then check the size of the main folders
    Code:

        Content for registered user only.    

    Remove unnecessary libraries and packages:


    To delete all package dependencies removed
    Code:

        Content for registered user only.    

    delete the files (.deb) of the packages that are no longer installed in the system;
    Code:

        Content for registered user only.    

    The following command is really interesting, because it allows the removal even of the configuration files. This can be useful when you want to reinstall applications from scratch.
    Code:

        Content for registered user only.    

    clean is much more radical than autoclean. It removes any files .deb from the apt cache, including those relating to the packages currently installed. This command allow a good a good recovery of disk space counterpart is that if you reinstall a package it have to be downloaded. (1.2 GB recovered)
    Code:

        Content for registered user only.    

    ##r remove from the cache (/ var / cache / apt) any package, except for the lock files


    we can tie together the commands with:
    Code:

        Content for registered user only.    

    ( I recovered 1.2 GB )


    Now, check and resolve any errors or broken dependencies with:
    Code:

        Content for registered user only.    

    Remove orphaned libraries
    Code:

        Content for registered user only.    
    sudo apt-get remove --purge `deborphan`; sudo apt-get autoremove
    or
    sudo deborphan | xargs sudo apt-get -y remove --purge
    and[/code]


    To search and cleaning unused configurations


    To search and cleaning folders and unused configurations files we can use :
    Code:

        Content for registered user only.    

    to seek only
    Code:

        Content for registered user only.    

    Remove Old Kernel


    Each version of the kernel can occupy up to 150 MB. If you have downloaded the headers you get 250MB of space. Therefore becomes crucial periodically remove some of the older kernels.


    Content for registered user only.heck the current kernel t


    uname -r


    View the installed kernels


    Code:

        Content for registered user only.    

    Code:

        Content for registered user only.    

    Lists the headers installed
    Code:

        Content for registered user only.    

    First remove the headers
    using somethings like this
    Code:

        Content for registered user only.    

    then remove any specific kernel that is no longer needed
    Code:

        Content for registered user only.    

    ( 0.6 GB recovered )


    Remove unnecessary location data packets


    To remove packages and languages ​​that do not involve using the program localpurge.
    Code:

        Content for registered user only.    

    .
    In the window that appears after installation, select the languages ​​you wish to protect.
    Here you can select the languages ​​that interest us.
    for example we can check:
    en
    en_GB
    en_US
    en_GB.UTF-8
    en_US.UTF-8


    then
    Code:

        Content for registered user only.    

    to reconfigure localpurge type
    Code:

        Content for registered user only.    

    To save space: remove o shrink files


    Let’s start by checking the folders size into home directory.
    You can use the command


    home directory


    Let’s start by checking the folders size into home directory.
    You can use the command
    Code:

        Content for registered user only.    

    Files to check periodically to save space:


    .xession-errors


    One of the files that can grow up to tens of GB and that may need to check is the file:
    /home/<myhome>/.xsession-errors


    This file can be erased from time to time.


    or to reduce it and keep last 200 lines of messages
    Code:

        Content for registered user only.    

    A home directory that you can grow a lot is the directory /cache.
    There there are the browsers cache so to clean up it I prefer to use browser commands.


    The directory /home/my-home/tmp should be checked and emptied every so often.


    directory /var


    at the root level, from time to time, check the /var direcotry :
    /var/log/
    /var/tmp/…
    /var/cache/…


    to display the size of the /var
    Code:

        Content for registered user only.    

    Alert. You should only delete files. Absolutely not delete the folders that contain them.


    Large size file


    May be useful to check if exist large size files everyware e for any users.
    The command for 750MB size files may be like:
    Code:

        Content for registered user only.    

    Services


    When you start ubuntu like any S.O. are activated services that are not always necessary with the inevitable resource consumption. To check the services that are not strictly necessary on a terminal you can use sysv-rc-conf.


    to install
    Code:

        Content for registered user only.    

    to start with
    Code:

        Content for registered user only.    

    Check or uncheck the options to set the start whether or not a service in a given runlevel (Less services are running more resources are available).


    Free up RAM


    To release the RAM could be useful
    Code:

        Content for registered user only.    

    more: Content for registered user only.


    Optimize Ubuntu


    Manage archives


    Install applications to manage archives of files compressed.
    If one needs to use the various formats of compressed files evaluate the installation of the following packages.
    Code:

        Content for registered user only.    

    Common Codecs


    A few common codecs
    Code:

        Content for registered user only.    

    Medibuntu


    Perhaps you have to evaluate installation of non-free-codec. “Medibuntu (Multimedia, Entertainment & Distractions In Ubuntu) is a repository of packages that cannot be included into the Ubuntu distribution for legal reasons (copyright, license, patent, etc). ” Content for registered user only.
    Code:

        Content for registered user only.    

    w32codecs video codecs for popular proprietary formats not natively supported by mplayer Content for registered user only.


    libdvdcss2 for play encrypted DVD Content for registered user only.


    Ubuntu 32bit
    Code:

        Content for registered user only.    

    Ubuntu 64bit
    Code:

        Content for registered user only.    

    FSlint


    FSlint is a useful application to search for duplicate files and not only in Ubuntu and Debian Linux ..
    Code:

        Content for registered user only.    

    Content for registered user only.


    GUI


    bleachbit is an effective way to clean a Linux system like Ubuntu: apt cache, browsers cache …


    install
    Code:

        Content for registered user only.    

    be used as either a user as root


    Ubuntu-Tweak


    Ubuntu Tweak allows configuration via GUI Ubuntu easily. Cleaning the cache of web browsers … and the removal of obsolete kernel, Configuring themes, sounds, default applications …


    install :
    Code:

        Content for registered user only.    

    Device busy


    In case of error device busy proceed similarly to what reported in this post Content for registered user only.


    List of useful applications


    Content for registered user only.


    Links:
    • Content for registered user only.
    • Content for registered user only.
     
  2. thanks sa tutorial. .
     
Thread Status:
Not open for further replies.
  1. PHCorner uses cookies to help personalise content and tailor your experience. By continuing to use this site, you are consenting to our use of cookies. Accept Learn More
    Dismiss Notice