Celeb Glow
news | April 04, 2026

How to remove temp files with a command other then "apt-get autoremove"? [closed]

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?

5

3 Answers

Try the below command to remove temp files,

sudo rm -rf /tmp/*

apt-get autoremove will remove automatically all unused packages.

6

You can use Ubuntu-tweak (see ) 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.

1

Slow ubuntu may not be because of low disk space. Is this a recent problem? (i.e was it signficantly faster before?) If not:

  1. 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.

  2. find out if any processes are hogging the CPU

  3. 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.

4