Posts tagged: xubuntu local repository

Xubuntu: how to create a local repository

I had the necessity to create a local repository in order to handle the upgrade of local packages, as if they were from official repositories.
 
Create your own repository folder

sudo su
mkdir /usr/local/packages

 
Create and edit the script file which will upgrade the packages’ list every time we add a new one

touch packages_list_upgrade.sh
cat packages_list_upgrade.sh
 
#!/bin/sh
DIR="."
# open each .deb file and create a zipped list file
CMD="dpkg-scanpackages $DIR | gzip > $DIR/Packages.gz"

eval $CMD
chmod +x packages_list_upgrade.sh

 
Update /etc/apt/source.list with the new location

echo "deb file:/usr/local packages" >> /etc/apt/source.list

 
Copy your packages into the folder and run the script

./packages_list_upgrade.sh

 
Now you can install/remove/manage your local packages using command line or through Synaptic

WordPress Themes