Remove Package From Freight

If you read our previous article Hosting Apt Repo’s With Freight you may have noted that we suggested a follow up article detailing how to remove a package from the repository was coming. Well, here we are. Below we will detail our method of removing packages from our Freight repository.

Removing Packages from Freight

For the purpose of this tutorial, we will be removing the base Postfix package from our repository. It is important to first understand that all freight packages are actually stored on your filesystem at /var/lib/freight/ and then in the folders you specify while adding the package, which in this case is apt/wheezy. So the first thing we will want to do is remove our package with the command below.

rm -rf /var/lib/freight/apt/wheezy/postfix_2.11.2-1~oitibs+1_amd64.deb

Next, we will need to remove the package from the Freight cache that is located at /var/cache/freight/.

rm -rf /var/cache/freight/pool/wheezy/main/p/postfix/postfix_2.11.2-1~oitibs+1_amd64.deb

Lastly, we will need to edit the Packages file prior to re-running freight cache to update our repository.

# edit packages by removing postfix package definition
nano /var/cache/freight/dists/wheezy-20141204103355375282792/main/binary-amd64/Packages
# update freight cache
freight cache

That is it. After performing the steps above, you should notice by browsing the repository that the removed package is no longer available.

Did you find this article useful? Why not share it with your friends?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.