Removing unwanted tarballs from the dist-git rpms
Description
This SOP provides instructions for sysadmin-main level users to remove unwanted tarballs and source RPMs from a branch in the dist-git repositories on Fedora’s infrastructure.
Steps to access the machine
-
SSH into
batcave01.iad2.fedoraproject.org
:ssh batcave01.iad2.fedoraproject.org
-
Switch to the root user:
sudo su
-
SSH into
pkgs01.iad2.fedoraproject.org
:ssh pkgs01.iad2.fedoraproject.org
Removing unwanted tarballs from dist-git
To remove unwanted tarballs and source RPMs from a specific branch of a package in the dist-git repository:
-
Navigate to the package repository:
cd /srv/git/repositories/rpms/PKG_NAME.git
-
Rewrite history on the desired branch:
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --force --index-filter 'git rm -r --cached --ignore-unmatch *.src.rpm *.tar.gz' --original refs/archive -- BRANCH
-
Move the backup reference:
mv refs/archive/refs/heads/BRANCH refs/archive/BRANCH
-
Remove the redundant directories:
rm -r refs/archive/refs/
Replace |
Want to help? Learn how to contribute to Fedora Docs ›