I'm not sure if you are asking for each of the countries listed, but I am assuming that they are there merely for example.
In the US, the are a variety of different rules for its different court systems. As a rule, each State can make its own rules for its court system, and the overarching Federal system has its own rules as well, although they run off of the same principles. As such, the answer varies on which state the court is located in and possibly the type of document.
In California, for example, different documents have different retention times for different documents. For example, documents for civil cases default to 10 years of retention, while adoption paperwork is retained permanently. For a criminal matter, the judgement (the final product that says if the accused is found guilty or innocent, and for what crimes) is retained permanently, while all other documents are retained for the greater of 50 years or the maximum length of sentence imposed.
When the retention period for a document is over, the document is not automatically destroyed(at least in California). Instead, the appropriate official sends an official notice to all the parties in the case that the document is to be destroyed, and if no response is received to transfer the documents, the documents can be destroyed.
(Source:http://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=GOV§ionNum=68152)
Note: I have said "document" throughout, which originally meant a piece of paper. However, recently, documents have been submitted electronically, and sometimes older documents are electronically scanned.