I have Ubuntu 12.04 lts.
I want to know that if there is a command other than:
sudo apt-get autoremove
to remove temp files?
Try the below command to remove temp files,
sudo rm -rf /tmp/*
apt-get autoremove
will remove automatically all unused packages.
You can use Ubuntu-tweak (see http://ubuntu-tweak.com/downloads/) to clean your Ubuntu installation ;)
If you have an SSD hard drive, you should also run sudo fstrim -v /
at least once a week to trim your hard drive.
16.04
and it appears there is /etc/cron.weekly
script already installed that uses fstrim
to "trim all mounted file systems which support it".
Jun 7, 2017 at 7:11
Slow ubuntu may not be because of low disk space. Is this a recent problem? (i.e was it signficantly faster before?) If not:
run free -m and post the results.
$free -m
total used free shared buffers cached
Mem: 5812 4919 892 0 164 822
-/+ buffers/cache: 3932 1879
Swap: 9050 2076 6973
If the -/+ buffers/cache: xxx yyy
line has very little free memory (yyy
<150) then you might be short of ram. This line is the one that tells you what the actually used/free memory is. (The first line is a bit misleading because it also counts spare ram that was used to pre-cache files as used).
1.1 if you are short of ram (and you had at least 1GB in total) open the system monitor
form the dash and arrange the processes in by memory usage. see if any process is taking up too much memory and try killing it. A usual culprit is zietgeist.
find out if any processes are hogging the CPU
Do you have a graphics card hat can handle unity? (it needs hardware acceleration for it's perfectly purple pixels) You might need to install the necessary drivers (search for "drivers" in the dash and run the application that is suggested.
If you dont have a dedicated graphics card you need to have a core-i processor from intel. (e.g. i3 and above. they have a tiny integrated graphics processor).
3.1 If you dont have a graphics card and/or you can't set up the drivers you will need to make unity a little easier on the CPU. follow the instructions here to drop some unecessary bling (Unity runs slow, how can I improve its performance?)
3.2 alternatively install a lighter DE like XFCE or LXDE. This will make a world of a difference on older machines.
Finally: if you have oodles of RAM and are just plain impatient with opening files install ureadahead. It finds the files you read the most often and loads them into ram, so they appear to open faster.
lsblk
command.