Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: How do you clean up Linux and why?

  1. #11
    Join Date
    Apr 2011
    Location
    Cinnamon land
    Beans
    359
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How do you clean up Linux and why?

    I'd advise Bleachbit over the Janitor, Janitor's been known to be buggy.
    Ubuntu Manual - Good Tutorials
    Webupd8 - Cinnamon! - Synapse
    Some just want to watch the world LEARN


  2. #12
    Join Date
    Mar 2013
    Beans
    30

    Re: How do you clean up Linux and why?

    sudo -s
    apt-get autoremove && apt-get autoclean -y

  3. #13
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: How do you clean up Linux and why?

    Edit. This one was plain wrong. I stand corrected.
    It must be quoted if written in one line
    Last edited by schragge; March 11th, 2013 at 09:21 AM.

  4. #14
    Join Date
    Sep 2012
    Location
    Gnome12o4/14o4
    Beans
    Hidden!

    Re: How do you clean up Linux and why?

    host@host:~$ sudo -s
    root@host:~# apt-get autoremove && apt-get autoclean -y

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done


    root@host:~# 'apt-get autoremove;apt-get -y autoclean'
    /bin/bash: apt-get autoremove;apt-get -y autoclean: command not found

    ..

  5. #15
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: How do you clean up Linux and why?

    Edit. Corrected. ibjsb4 and sudodus, thanks for pointing out my mistake.
    Once again, when written on one line.

    Edit. The paragraphs below are correct now, but completely off-topic here.

    It's often used to get redirections right with sudo. E.g.
    Code:
    sudo echo 10 >/proc/sys/vm/swappiness
    is wrong as sudo only affects echo, but redirections are executed with regular user's permissions, and normal user doesn't have write access to /proc/sys/vm/swappiness. To get redirection work, this could be rewritten as either
    Code:
    echo 10 | sudo tee /proc/sys/vm/swappiness
    or
    Code:
    sudo sh -c 'echo 10 >/proc/sys/vm/swappiness'
    This example is somewhat contrived as the right way to change swappiness is
    Code:
    sudo sysctl vm.swappiness=10
    Last edited by schragge; March 11th, 2013 at 09:31 AM.

  6. #16
    Join Date
    Jul 2009
    Location
    AL, USA
    Beans
    318
    Distro
    Xubuntu 13.10 Saucy Salamander

    Re: How do you clean up Linux and why?

    I definitely suggest bleachbit. When the issue arose about ever-cookies, the bleachbit dev was the first to confirm deletion of said cookies. Flash and all other manner of cruft is removed. It's also one that I use for Windows, just too bad it doesn't clean the registry. Then I'd put over and above CCleaner.
    HP Pavilion dv6, Core i3-3110M, 6GB RAM, nVIDIA Geforce GT 650M, 640GB HDD: Win7 / Xubuntu 13.10 64bit

  7. #17
    Join Date
    Sep 2012
    Location
    Gnome12o4/14o4
    Beans
    Hidden!

    Re: How do you clean up Linux and why?

    Quote Originally Posted by schragge View Post
    Once again, when written on one line.
    Code:
    sudo -s  'apt-get autoremove;apt-get -y autoclean'
    host@host:~$ sudo -s 'apt-get autoremove;apt-get -y autoclean'
    [sudo] password for host:
    /bin/bash: apt-get autoremove;apt-get -y autoclean: command not found

    Once again it does not work, have you even tried it?

  8. #18
    Join Date
    Apr 2011
    Location
    Cinnamon land
    Beans
    359
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How do you clean up Linux and why?

    Quote Originally Posted by ibjsb4 View Post
    host@host:~$ sudo -s 'apt-get autoremove;apt-get -y autoclean'
    [sudo] password for host:
    /bin/bash: apt-get autoremove;apt-get -y autoclean: command not found

    Once again it does not work, have you even tried it?
    Once you are root, you can just do
    Code:
    apt-get autoremove && apt-get -y autoclean
    The '&&' always works, as a way of stringing two commands together. I do sudo apt-get update && sudo apt-get dist-upgrade for all my updates, flawless.
    Ubuntu Manual - Good Tutorials
    Webupd8 - Cinnamon! - Synapse
    Some just want to watch the world LEARN


  9. #19
    Join Date
    Sep 2012
    Location
    Gnome12o4/14o4
    Beans
    Hidden!

    Re: How do you clean up Linux and why?

    Thank you blackbird34, Yes your command will work fine. I was just trying to find out why schragge would post non-working commands and also would like to know what swappiness has to do with cleaning up linux.

  10. #20
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: How do you clean up Linux and why?

    Quote Originally Posted by ibjsb4 View Post
    Once again it does not work, have you even tried it?
    No, I haven't. I read about sudo -s in the sudo manual page, and somehow assumed it would work. Thank you for correcting my misconception! Lesson learned. As I see now, sudo -s is equivalent to sudo -i except for the environment not being changed to that of root. That means it will work only in the following form (yes, now I've tested it):
    Code:
    sudo -s eval 'apt-get -y autoremove;apt-get autoclean'
    or, better yet
    Code:
    sudo -i eval 'apt-get -y autoremove;apt-get autoclean'
    Note also that it makes more sense using the option -y/--assume-yes with autoremove than with autoclean as autoclean usually won't ask you any questions anyway.

    Just for fun, the shortest command equivalent to the sudo -s eval shown above is probably
    Code:
    sudo sh -c '$0 -y autoremove;$0 autoclean' apt-get
    Last edited by schragge; March 11th, 2013 at 12:41 PM.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •