how do i clear my cache Ubuntu 8.04

Asked by Jennifer

cannot find an answer in archives. How do I clear the cache other than clearing data in Tools

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu firefox Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Soul-Sing (soulzing) said :
#1

When you download packages for installation, they are held in /var/cache/apt/archives to clean them:
sudo apt-get clean

Revision history for this message
Jennifer (jrcurry) said :
#2

I am not downloading packages for installation. I want to clear the cache already there ie history, files, etc. I know I can clear the private data in Tools menu but I am looking for more than that because my system is very slow. I also get a msg on the screen that my Flash Player 9 is slow. In Windows XP you can do this in Accessories>Disk Clean Up but I don't know where this is in Linux ubuntu.

Revision history for this message
Vikram Dhillon (dhillon-v10) said :
#3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Are you referring to the cache in firefox, then yah in tools. Other
than that the temporary files get remove when you shutdown your
computer. Apt-cache can be cleaned up by sudo apt-get clean, sudo
apt-get autoclcean, sudo apt-get autoremove

Regards,
Vikram Dhillon

On 12/26/2009 01:33 AM, Jennifer wrote:
> New question #95215 on Ubuntu:
> https://answers.launchpad.net/ubuntu/+question/95215
>
> cannot find an answer in archives. How do I clear the cache other than clearing data in Tools
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAks26NsACgkQcoBavQdRHcwS8QCcCJSKA+T8Fx6S8B/hNVS5PQ1M
kocAn0J5GXYvzr6kC5wszDuZv0Lw4B+R
=X88d
-----END PGP SIGNATURE-----

Revision history for this message
Jennifer (jrcurry) said :
#4

I suppose you are right that it is the Firefox cache. Did not quite follow your answer. Please inform me what command to enter into terminal?

Revision history for this message
Jeruvy (jeruvy) said :
#5

Generally Firefox handles this from within, Going to 'Tools -> ClearRecent History' should work. You can click on the droplist and ensure 'cache' is checked.

Revision history for this message
Jeruvy (jeruvy) said :
#6

I should note that if you are still using 3.0.x version of Firefox it's called 'Clear Private Data' instead and there are no options (they are configured in your preferences). Sorry I should have mentioned this.

Revision history for this message
Jennifer (jrcurry) said :
#7

Yes it is Firefox 3.0 because I keep reading about problems with the 3.5 version. I still use 8.04 ubuntu. I don't know if I should upgrade or not. I have done clear private data already, but I was hoping for an equivalent feature to the Windows Clean Up disk which is above and beyond the Internet>Tools>Delete

Revision history for this message
Jennifer (jrcurry) said :
#8

What does the command sudo apt-get clean do?

Revision history for this message
Soul-Sing (soulzing) said :
#9

That removes the aptitude cache in /var/cache/apt/archives

Revision history for this message
Soul-Sing (soulzing) said :
#10

but i said that in the first post.......

Revision history for this message
Soul-Sing (soulzing) said :
#11

You should made it more clear what you want, cleaning the system? : http://www.ubuntugeek.com/cleaning-up-all-unnecessary-junk-files-in-ubuntu.html

Revision history for this message
GREG T. (ubuntuer) said :
#12

 this will do what you want http://ubuntuforums.org/showthread.php?t=140920 the above http site is good but this maybe easier for you to use .. myself i use 3.5.6 and love it ,,,, open firefox under edit >preference under privacy the first line click the arrow use select custom setting helps a lot .

Revision history for this message
Jennifer (jrcurry) said :
#13

I did change some settings, thanks. I don't think this cleared the cache.

I still don't understand whether I am supposed to clear the aptitude cache whatever that is, with the command line
of sudo apt-get??

Revision history for this message
Soul-Sing (soulzing) said :
#14

what cache are we talking about? buffer cache?

Reading from a disk [1] is very slow compared to accessing (real) memory. In addition, it is common to read the same part of a disk several times during relatively short periods of time. For example, one might first read an e-mail message, then read the letter into an editor when replying to it, then make the mail program read it again when copying it to a folder. Or, consider how often the command ls might be run on a system with many users. By reading the information from disk only once and then keeping it in memory until no longer needed, one can speed up all but the first read. This is called disk buffering, and the memory used for the purpose is called the buffer cache.

Since memory is, unfortunately, a finite, nay, scarce resource, the buffer cache usually cannot be big enough (it can't hold all the data one ever wants to use). When the cache fills up, the data that has been unused for the longest time is discarded and the memory thus freed is used for the new data.

Disk buffering works for writes as well. On the one hand, data that is written is often soon read again (e.g., a source code file is saved to a file, then read by the compiler), so putting data that is written in the cache is a good idea. On the other hand, by only putting the data into the cache, not writing it to disk at once, the program that writes runs quicker. The writes can then be done in the background, without slowing down the other programs.

Most operating systems have buffer caches (although they might be called something else), but not all of them work according to the above principles. Some are write-through: the data is written to disk at once (it is kept in the cache as well, of course). The cache is called write-back if the writes are done at a later time. Write-back is more efficient than write-through, but also a bit more prone to errors: if the machine crashes, or the power is cut at a bad moment, or the floppy is removed from the disk drive before the data in the cache waiting to be written gets written, the changes in the cache are usually lost. This might even mean that the filesystem (if there is one) is not in full working order, perhaps because the unwritten data held important changes to the bookkeeping information.

or The Linux Page Cache?

The role of the Linux page cache is to speed up access to files on disk. Memory mapped files are read a page at a time and these pages are stored in the page cache. The figure above shows that the page cache consists of the page_hash_table, a vector of pointers to mem_map_t data structures.

Each file in Linux is identified by a VFS inode data structure (described previously). Each VFS inode is unique and fully describes one and only one file. The index into the page table is derived from the file's VFS inode and the offset into the file.

Whenever a page is read from a memory mapped file, for example when it needs to be brought back into memory during demand paging, the page is read through the page cache. If the page is present in the cache, a pointer to the mem_map_t data structure representing it is returned to the page fault handling code. Otherwise the page must be brought into memory from the file system that holds the image. Linux allocates a physical page and reads the page from the file on disk.

If it is possible, Linux will initiate a read of the next page in the file. This single page read ahead means that if the process is accessing the pages in the file serially, the next page will be waiting in memory for the process.

Over time the page cache grows as images are read and executed. Pages will be removed from the cache as they are no longer needed, say as an image is no longer being used by any process. As Linux uses memory it can start to run low on physical pages. In this case Linux will reduce the size of the page cache.

apt-cache?
: http://linux.die.net/man/8/apt-cache

DNS- cache?
estart the nscd daemon:-

    - To restart the nscd daemon, type /etc/rc.d/init.d/nscd restart in your terminal
    - Once you run the command your linux DNS cache will flush.

(sources: world wide web)

Can you help with this problem?

Provide an answer of your own, or ask Jennifer for more information if necessary.

To post a message you must log in.