Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- First create repo local location using
- createrepo /mnt/home/artix/fedoralocal
- you need to install
- sudo dnf install dnf-plugins-extras-local
- Go to /etc/dnf/plugins/local.conf and point the repo directory location
- whenever you update fedora, the rpm files go to the local repo directory. and if the files are in local, then they will not be downloaded!!!
- [main]
- enabled = true
- # Path to the local repository.
- # repodir = /var/lib/dnf/plugins/local
- repodir= /mnt/home/artix/fedoralocal
- # Createrepo options. See man createrepo_c
- [createrepo]
- enabled = true
- # If you want to speedup createrepo with the --cachedir option. Eg.
- # cachedir = /tmp/createrepo-local-plugin-cachedir
- # quiet = true
- # verbose = false
- This repo will be the backup of the other repos meaning the system will search the other repos for the package. Afterwards it will look in the folder for the local download. If you want it to search the repo first, you need the following.
- create a file in /etc/yum.repos.d/mylocal.repo
- put in the file the following:
- [Mylocal]
- name=RPM Sphere - Basearch
- baseurl=file:///media/sf_fedoralocal
- skip_if_unavailable=True
- #repo_gpgcheck=0
- gpgcheck=0
- #sslverify=False
- enabled=1
- repomanage will print information of the old packages or the new packages
- dnf repomanage /mnt/home/artix/fedoralocal --old
- will print all the old packaes. you can pipe the results to a file and use rm to delete them for example
- dnf repomanage /mnt/home/artix/fedoralocal --new
- this will give all the updated packages installed.
- Dnf repomanage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement