I'd advise Bleachbit over the Janitor, Janitor's been known to be buggy.
I'd advise Bleachbit over the Janitor, Janitor's been known to be buggy.
check out KDE Neon
Dell Inspiron 5625, AMD Ryzen 7 5825U
sudo -s
apt-get autoremove && apt-get autoclean -y
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.
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
..
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.
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 eitherCode:sudo echo 10 >/proc/sys/vm/swappiness
orCode:echo 10 | sudo tee /proc/sys/vm/swappinessThis example is somewhat contrived as the right way to change swappiness isCode:sudo sh -c 'echo 10 >/proc/sys/vm/swappiness'
Code:sudo sysctl vm.swappiness=10
Last edited by schragge; March 11th, 2013 at 09:31 AM.
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.
Thinkpad T430, Intel i5-3320M (Ivy), 8GB RAM, Intel HD 4000, 500GB HDD: Xubuntu 20.04 LTS 64bit
check out KDE Neon
Dell Inspiron 5625, AMD Ryzen 7 5825U
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.
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):
or, better yetCode:sudo -s 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.Code:sudo -i eval 'apt-get -y autoremove;apt-get autoclean'
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.
Bookmarks