虚拟化容器,大数据,DBA,中间件,监控。

How to Check the Size og yum Channels in CentOS/RHEL

17 12月
作者:admin|分类:系统运维

Question: How to find out how large a yum channel repository is, to know how much data the channel will sync to a local yum repository?

To see the actual size of the repository use either the ‘yum repolist -v‘ or ‘yum repoinfo‘ command.

Example for checking the size of “CentOS-8 – AppStream” yum channel

Run the command as shown below to get the size of the Repo “CentOS-8 – AppStream”. The command works even without the double quotes around the repo name.

# yum repoinfo "CentOS-8 - AppStream"
Last metadata expiration check: 0:01:26 ago on Thu 10 Dec 2020 01:13:18 PM UTC.

Repo-id            : AppStream
Repo-name          : CentOS-8 - AppStream
Repo-status        : enabled
Repo-revision      : 8.3.2011
Repo-distro-tags      : [cpe:/o:centos:centos:8]:  , 8, C, O, S, e, n, t
Repo-updated       : Fri 20 Nov 2020 05:52:02 PM UTC
Repo-pkgs          : 5,684
Repo-available-pkgs: 4,988
Repo-size          : 6.9 G
Repo-mirrors       : http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=ec2
Repo-baseurl       : http://d36uatko69830t.cloudfront.net/centos/8/AppStream/x86_64/os/ (1 more)
Repo-expire        : 172,800 second(s) (last: Thu 10 Dec 2020 01:13:18 PM UTC)
Repo-filename      : /etc/yum.repos.d/CentOS-AppStream.repo
Total packages: 5,684

Example for checking the size of all enabled yum channels

Another command to view the size of all the yum repos configured on the system is “yum repolist -v”. The -v option verbosely prints all the information for all the repos inclusing their sizes.

# yum repolist -v
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, uploadprofile
YUM version: 4.2.17
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (CentOS Linux 8; generic; Linux.x86_64)'
repo: using cache for: AppStream
AppStream: using metadata from Fri 20 Nov 2020 05:52:02 PM UTC.
repo: using cache for: BaseOS
BaseOS: using metadata from Fri 20 Nov 2020 05:51:54 PM UTC.
repo: using cache for: extras
extras: using metadata from Thu 17 Sep 2020 03:13:28 PM UTC.
Last metadata expiration check: 6:35:33 ago on Thu 10 Dec 2020 06:29:52 AM UTC.
Completion plugin: Generating completion cache...

Repo-id            : AppStream
Repo-name          : CentOS-8 - AppStream
Repo-revision      : 8.3.2011
Repo-distro-tags      : [cpe:/o:centos:centos:8]:  , 8, C, O, S, e, n, t
Repo-updated       : Fri 20 Nov 2020 05:52:02 PM UTC
Repo-pkgs          : 5,684
Repo-available-pkgs: 4,988
Repo-size          : 6.9 G
Repo-mirrors       : http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=ec2
Repo-baseurl       : http://d36uatko69830t.cloudfront.net/centos/8/AppStream/x86_64/os/ (1 more)
Repo-expire        : 172,800 second(s) (last: Thu 10 Dec 2020 06:29:52 AM UTC)
Repo-filename      : /etc/yum.repos.d/CentOS-AppStream.repo

Repo-id            : BaseOS
Repo-name          : CentOS-8 - Base
Repo-revision      : 8.3.2011
Repo-distro-tags      : [cpe:/o:centos:centos:8]:  , 8, C, O, S, e, n, t
Repo-updated       : Fri 20 Nov 2020 05:51:54 PM UTC
Repo-pkgs          : 1,694
Repo-available-pkgs: 1,692
Repo-size          : 1.1 G
Repo-mirrors       : http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=BaseOS&infra=ec2
Repo-baseurl       : http://d36uatko69830t.cloudfront.net/centos/8/BaseOS/x86_64/os/ (1 more)
Repo-expire        : 172,800 second(s) (last: Thu 10 Dec 2020 06:29:52 AM UTC)
Repo-filename      : /etc/yum.repos.d/CentOS-Base.repo

Repo-id            : extras
Repo-name          : CentOS-8 - Extras
Repo-revision      : 1600355621
Repo-updated       : Thu 17 Sep 2020 03:13:28 PM UTC
Repo-pkgs          : 27
Repo-available-pkgs: 27
Repo-size          : 311 k
Repo-mirrors       : http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=extras&infra=ec2
Repo-baseurl       : http://d36uatko69830t.cloudfront.net/centos/8/extras/x86_64/os/ (1 more)
Repo-expire        : 172,800 second(s) (last: Thu 10 Dec 2020 06:29:52 AM UTC)
Repo-filename      : /etc/yum.repos.d/CentOS-Extras.repo
Total packages: 7,405

浏览609 评论0
返回
目录
返回
首页
Kubernetes弃用Docker后怎么办? TimeFinder SnapVX Concepts and SnapVX Operations