What are the common maintenance tasks?
When i was using windows, i used to run defrags, ccleaner and revouninstaller once a month to keep the system and the registry clean.
I know ubuntu (and all linux distro) has a different system structure and doesnt need defrags, but i've heard there are some mainenance tasks that help to keep the system clean (for example, sudo apt-get clean
or sudo apt-get autoremove
)
How many of those commands/software (and please explain what they do and if they can compromise the system stability) do you know and use regularly?
Solution 1:
The purpose of the commands you mention is solely to save disk space. Furthermore, on most machines nowadays the savings would only amount to a tiny fraction of your disk space. So they're not very useful.
Most common maintenance tasks are performed automatically by the system. If you're curious about them, the scripts that perform them are in /etc/cron.*
. The name or contents of the script might give you a hint of what they do. Don't change anything you don't understand — these commands are there for a reason.
One maintenance task which is not done automatically is installing security and stability updates (major bug fixes). By default, you will get a notification that updates are available. You should follow on the notification at the first opportunity. This is not done automatically in case the updates arrive at an inconvenient time, like when you're on a pay-per-byte Internet access or you have to switch off your computer right now; also because there is a (very small) risk that the updates break something and it's better not to do it unattended.
Updates are the only maintenance task that I trigger manually. If I had to do anything else, I'd consider it a bug. If it has to be done, it should be automated.
Solution 2:
I recomend 2 gui-programs to you:
- bleach bit
- ubuntu tweak.
bleach-bit is the "ccleaner"-equivalent for linux, so you can figure what it can do:
sudo apt-get install bleachbit from console to install.
ubuntu tweak is kinda a "tweak-ui"/software center/gconf/etc what we are interested here is the "package cleaner" option:
To install ubuntu-tweak:
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak
Solution 3:
From the offical man page of apt-get (shortversion by me):
clean
clean clears out the local repository of retrieved package files.
It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/.
This frees up disk space
autoremove
autoremove is used to remove packages that were automatically
installed to satisfy dependencies for some package and that are no
more needed.
There is also the gui computer-janitor
(System
=> Administration
=> System Janitor
)