Viral fossil is an informal term for pieces of genetic code (DNA insertions) of a virus in the genome of a modern-day host organism. These viruses and their insertions are called fossil viruses or paleoviruses. They may be traced to millions of years back, hence the terminology, although strictly speaking, it is impossible to detect an ancient virus in fossils. Viral fossils are among the subject of a recent field dubbed paleovirology.
Most known types of viral fossils originate from retroviruses and are termed endogenous retroviruses (ERVs). Other viral fossils originate from DNA viruses such as hepadnaviruses (a group that includes hepatitis B). The most surprising viral fossils originate from non-retroviral RNA viruses. These have been termed Non-retroviral Integrated RNA Viruses or NIRVs. Unlike other types of viral fossils, NIRV formation requires borrowing the integration machinery that is coded by the host genome or by a co-infecting retrovirus.
Successful attempts to "resurrect" extinct viruses from the DNA fossils have been reported.