Archive - ArchWiki

# Archive

Related articles

- Arch Rollback Machine
- Downgrading packages

The Arch Linux Archive stores official repositories, iso images and AUR packages across time. This can be considered as an Arch Linux Museum.

You can use it to find an old version of a repository, to restore all your packages at a precise moment; to find a previous version of a package, to downgrade because the last is broken (and you lost your cache).

## Location

The Arch Linux Archive is currently available at http://seblu.net/a/archive or ftp://seblu.net/archlinux/archive

## Hierarchy

The Archive is split into 4 main directories detailed below.

    ├── aur
    ├── iso
    ├── packages
    └── repos

### repos

The repos directory contains daily snapshots of official mirror organized by date like the following

    repos
    ├── 2013
    │   ├── 08
    │   │   └── 31
    │   │       ├── community
    │   │       ├── community-staging
    │   │       ├── community-testing
    │   │       ├── core
    │   │       ├── extra
    │   │       ├── gnome-unstable
    │   │       ├── kde-unstable
    │   │       ├── lastsync
    │   │       ├── multilib
    │   │       ├── multilib-staging
    │   │       ├── multilib-testing
    │   │       ├── pool
    │   │       ├── staging
    │   │       └── testing
    │   ├── 09
    │   │   ├── 01
    │   │   ├── 02
    │   │   ├── ...
    │   │   ├── 21
    │   │   └── 22
    │   ├── 10
    │   │   ├── 01
    │   │   ├── 02
    │   │   ├── ...
    │   │
    │   ├── 11
    │   └── 12
    └── 2014
        ├── 01
        │   ├── 01
        │   ├── 02
        │   ├── ...
        │
        ├── 02
        ├── 03
        ├── ...
        └── 09
            ├── 01
            ├── ...
            └── 28

### packages

The packages directory contains all versions of each package with their signatures. One directory by package and package directories are grouped by their first letter.

    ├── packages
    │   ├── a
    │   │   ├── awesome
    │   │   │   ├── awesome-3.5.0-1-i686.pkg.tar.xz
    │   │   │   ├── awesome-3.5.0-1-i686.pkg.tar.xz.sig
    │   │   │   ├── awesome-3.5.0-1-x86_64.pkg.tar.xz
    │   │   │   ├── awesome-3.5.0-1-x86_64.pkg.tar.xz.sig
    │   │   │   ├── awesome-3.5.1-1-i686.pkg.tar.xz
    │   │   │   ├── awesome-3.5.1-1-i686.pkg.tar.xz.sig
    │   │   │   ├── ...
    │   │   │
    │   │   ├── ...
    │   │   ├── awstats
    │   │   └── axel
    │   │
    │   ├── b
    │   ├── ...
    │   └── z

You can use the magic subdirectory .all to access all packages by their name. In a nutshell, all versions of each package in one flat directory. No listing allowed.

    ├── packages
    │   ├── .all
    │   │   ├── awesome-3.5.1-1-i686.pkg.tar.xz
    │   │   ├── ...
    │   │   ├── zsh-5.0.2-3-i686.pkg.tar.xz
    │   │   ├── zsh-5.0.2-4-i686.pkg.tar.xz
    │   │   └── ...

## FAQ

### How to downgrade one package

1. Run your favorite internet browser and go to http://seblu.net/a/archive/packages;
2. Go to the package you need and download it;
3. Run `pacman -U pkgname.pkg.tar.xz` as root.

### How to restore all my packages at a specific date

To restore all the package you have at a specific date, let says 30th March 2014, you have to stuck pacman at this date, by editing your `/etc/pacman.conf` and use the following server directive:

    [core]
    SigLevel = PackageRequired
    Server=http://seblu.net/a/archive/repos/2014/03/30/$repo/os/$arch

    [extra]
    SigLevel = PackageRequired
    Server=http://seblu.net/a/archive/repos/2014/03/30/$repo/os/$arch

    [community]
    SigLevel = PackageRequired
    Server=http://seblu.net/a/archive/repos/2014/03/30/$repo/os/$arch

or by replace your `/etc/pacman.d/mirrorlist` by the following content:

    ##
    ## Arch Linux repository mirrorlist
    ## Generated on 2042-01-01
    ##
    Server=http://seblu.net/a/archive/repos/2014/03/30/$repo/os/$arch

Then update the database and force downgrade:

    # pacman -Syyuu

Note: It's not safe to mix Archive and up-to-date mirrors. In case of download failure, you can fall-back on an upstream package and you will have packages not from the same epoch as the rest of the system.

## TODO

- Move to official infrastructure.
- Automatic clean-up after a defined amount of time?

## Sources

Scripts used to create this are simple.

You can find them here: https://github.com/seblu/archivetools

Category:

- Package management