Tuesday, July 21, 2009

deb_clean

This cleans your source.list file, and then replaces the repos for debian 4 you can probably replace etch with lenny to update debian 5 boxes. It also accounts for the debian keyring update that recently occured

#!/bin/bash

# Designed to fix the repos on a legacy debian box.
# By L.C.

apt-get clean all ;
cat > /etc/apt/sources.list <# New Repo list
deb http://ftp.us.debian.org/debian/ etch main
deb-src http://ftp.us.debian.org/debian/ etch main
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
EOF
apt-get -y --force-yes install debian-archive-keyring && apt-get update && apt-get -y --force-yes upgrade ;

No comments: