@fredlackey/devutils 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
- package/src/commands/install.js +374 -36
- package/src/installs/adobe-creative-cloud.js +527 -25
- package/src/installs/adobe-creative-cloud.md +605 -0
- package/src/installs/appcleaner.js +303 -26
- package/src/installs/appcleaner.md +699 -0
- package/src/installs/apt-transport-https.js +390 -0
- package/src/installs/apt-transport-https.md +678 -0
- package/src/installs/atomicparsley.js +624 -26
- package/src/installs/atomicparsley.md +795 -0
- package/src/installs/aws-cli.js +779 -26
- package/src/installs/aws-cli.md +727 -0
- package/src/installs/balena-etcher.js +688 -26
- package/src/installs/balena-etcher.md +761 -0
- package/src/installs/bambu-studio.js +912 -26
- package/src/installs/bambu-studio.md +780 -0
- package/src/installs/bash-completion.js +554 -23
- package/src/installs/bash-completion.md +833 -0
- package/src/installs/bash.js +399 -26
- package/src/installs/bash.md +993 -0
- package/src/installs/beyond-compare.js +585 -26
- package/src/installs/beyond-compare.md +813 -0
- package/src/installs/build-essential.js +511 -26
- package/src/installs/build-essential.md +977 -0
- package/src/installs/ca-certificates.js +618 -0
- package/src/installs/ca-certificates.md +937 -0
- package/src/installs/caffeine.js +490 -26
- package/src/installs/caffeine.md +839 -0
- package/src/installs/camtasia.js +577 -25
- package/src/installs/camtasia.md +762 -0
- package/src/installs/chatgpt.js +458 -26
- package/src/installs/chatgpt.md +814 -0
- package/src/installs/chocolatey.js +447 -0
- package/src/installs/chocolatey.md +661 -0
- package/src/installs/chrome-canary.js +472 -26
- package/src/installs/chrome-canary.md +641 -0
- package/src/installs/chromium.js +645 -26
- package/src/installs/chromium.md +838 -0
- package/src/installs/claude-code.js +558 -26
- package/src/installs/claude-code.md +1173 -0
- package/src/installs/curl.js +361 -26
- package/src/installs/curl.md +714 -0
- package/src/installs/cursor.js +561 -26
- package/src/installs/cursor.md +970 -0
- package/src/installs/dbschema.js +674 -26
- package/src/installs/dbschema.md +925 -0
- package/src/installs/dependencies.md +435 -0
- package/src/installs/development-tools.js +600 -0
- package/src/installs/development-tools.md +977 -0
- package/src/installs/docker.js +1010 -25
- package/src/installs/docker.md +1109 -0
- package/src/installs/drawio.js +1001 -26
- package/src/installs/drawio.md +795 -0
- package/src/installs/elmedia-player.js +328 -25
- package/src/installs/elmedia-player.md +556 -0
- package/src/installs/ffmpeg.js +870 -25
- package/src/installs/ffmpeg.md +852 -0
- package/src/installs/file.js +464 -0
- package/src/installs/file.md +987 -0
- package/src/installs/gemini-cli.js +793 -26
- package/src/installs/gemini-cli.md +1153 -0
- package/src/installs/git.js +382 -26
- package/src/installs/git.md +907 -0
- package/src/installs/gitego.js +931 -26
- package/src/installs/gitego.md +1172 -0
- package/src/installs/go.js +913 -26
- package/src/installs/go.md +958 -0
- package/src/installs/google-chrome.js +801 -25
- package/src/installs/google-chrome.md +862 -0
- package/src/installs/gpg.js +412 -73
- package/src/installs/gpg.md +1056 -0
- package/src/installs/homebrew.js +1015 -26
- package/src/installs/homebrew.md +988 -0
- package/src/installs/imageoptim.js +950 -26
- package/src/installs/imageoptim.md +1119 -0
- package/src/installs/installers.json +2297 -0
- package/src/installs/jq.js +382 -26
- package/src/installs/jq.md +809 -0
- package/src/installs/keyboard-maestro.js +701 -26
- package/src/installs/keyboard-maestro.md +825 -0
- package/src/installs/latex.js +771 -26
- package/src/installs/latex.md +1095 -0
- package/src/installs/lftp.js +338 -26
- package/src/installs/lftp.md +907 -0
- package/src/installs/lsb-release.js +346 -0
- package/src/installs/lsb-release.md +814 -0
- package/src/installs/messenger.js +829 -26
- package/src/installs/messenger.md +900 -0
- package/src/installs/microsoft-office.js +550 -26
- package/src/installs/microsoft-office.md +760 -0
- package/src/installs/microsoft-teams.js +782 -25
- package/src/installs/microsoft-teams.md +886 -0
- package/src/installs/node.js +886 -26
- package/src/installs/node.md +1153 -0
- package/src/installs/nordpass.js +698 -26
- package/src/installs/nordpass.md +921 -0
- package/src/installs/nvm.js +977 -26
- package/src/installs/nvm.md +1057 -0
- package/src/installs/openssh.js +734 -64
- package/src/installs/openssh.md +1056 -0
- package/src/installs/pandoc.js +644 -26
- package/src/installs/pandoc.md +1036 -0
- package/src/installs/pinentry.js +492 -26
- package/src/installs/pinentry.md +1142 -0
- package/src/installs/pngyu.js +851 -26
- package/src/installs/pngyu.md +896 -0
- package/src/installs/postman.js +781 -26
- package/src/installs/postman.md +940 -0
- package/src/installs/procps.js +425 -0
- package/src/installs/procps.md +851 -0
- package/src/installs/safari-tech-preview.js +355 -25
- package/src/installs/safari-tech-preview.md +533 -0
- package/src/installs/sfnt2woff.js +640 -26
- package/src/installs/sfnt2woff.md +795 -0
- package/src/installs/shellcheck.js +463 -26
- package/src/installs/shellcheck.md +1005 -0
- package/src/installs/slack.js +722 -25
- package/src/installs/slack.md +865 -0
- package/src/installs/snagit.js +566 -25
- package/src/installs/snagit.md +844 -0
- package/src/installs/software-properties-common.js +372 -0
- package/src/installs/software-properties-common.md +805 -0
- package/src/installs/spotify.js +858 -25
- package/src/installs/spotify.md +901 -0
- package/src/installs/studio-3t.js +803 -26
- package/src/installs/studio-3t.md +918 -0
- package/src/installs/sublime-text.js +780 -25
- package/src/installs/sublime-text.md +914 -0
- package/src/installs/superwhisper.js +687 -25
- package/src/installs/superwhisper.md +630 -0
- package/src/installs/tailscale.js +727 -26
- package/src/installs/tailscale.md +1100 -0
- package/src/installs/tar.js +389 -0
- package/src/installs/tar.md +946 -0
- package/src/installs/termius.js +780 -26
- package/src/installs/termius.md +844 -0
- package/src/installs/terraform.js +761 -26
- package/src/installs/terraform.md +899 -0
- package/src/installs/tidal.js +752 -25
- package/src/installs/tidal.md +864 -0
- package/src/installs/tmux.js +328 -26
- package/src/installs/tmux.md +1030 -0
- package/src/installs/tree.js +393 -26
- package/src/installs/tree.md +833 -0
- package/src/installs/unzip.js +460 -0
- package/src/installs/unzip.md +879 -0
- package/src/installs/vim.js +403 -26
- package/src/installs/vim.md +1040 -0
- package/src/installs/vlc.js +803 -26
- package/src/installs/vlc.md +927 -0
- package/src/installs/vscode.js +825 -26
- package/src/installs/vscode.md +1002 -0
- package/src/installs/wget.js +415 -0
- package/src/installs/wget.md +791 -0
- package/src/installs/whatsapp.js +710 -25
- package/src/installs/whatsapp.md +854 -0
- package/src/installs/winpty.js +352 -0
- package/src/installs/winpty.md +620 -0
- package/src/installs/woff2.js +535 -26
- package/src/installs/woff2.md +977 -0
- package/src/installs/wsl.js +572 -0
- package/src/installs/wsl.md +699 -0
- package/src/installs/xcode-clt.js +520 -0
- package/src/installs/xcode-clt.md +351 -0
- package/src/installs/xcode.js +542 -26
- package/src/installs/xcode.md +573 -0
- package/src/installs/yarn.js +806 -26
- package/src/installs/yarn.md +1074 -0
- package/src/installs/yq.js +636 -26
- package/src/installs/yq.md +944 -0
- package/src/installs/yt-dlp.js +683 -26
- package/src/installs/yt-dlp.md +946 -0
- package/src/installs/yum-utils.js +297 -0
- package/src/installs/yum-utils.md +648 -0
- package/src/installs/zoom.js +740 -25
- package/src/installs/zoom.md +884 -0
- package/src/scripts/README.md +567 -45
- package/src/scripts/STATUS.md +208 -0
- package/src/scripts/afk.js +395 -7
- package/src/scripts/backup-all.js +731 -9
- package/src/scripts/backup-source.js +711 -8
- package/src/scripts/brewd.js +373 -7
- package/src/scripts/brewi.js +505 -9
- package/src/scripts/brewr.js +512 -9
- package/src/scripts/brews.js +462 -9
- package/src/scripts/brewu.js +488 -7
- package/src/scripts/c.js +185 -7
- package/src/scripts/ccurl.js +325 -8
- package/src/scripts/certbot-crontab-init.js +488 -8
- package/src/scripts/certbot-init.js +641 -9
- package/src/scripts/ch.js +339 -7
- package/src/scripts/claude-danger.js +253 -8
- package/src/scripts/clean-dev.js +419 -8
- package/src/scripts/clear-dns-cache.js +525 -7
- package/src/scripts/clone.js +417 -7
- package/src/scripts/code-all.js +420 -7
- package/src/scripts/count-files.js +195 -8
- package/src/scripts/count-folders.js +195 -8
- package/src/scripts/count.js +248 -8
- package/src/scripts/d.js +203 -7
- package/src/scripts/datauri.js +373 -8
- package/src/scripts/delete-files.js +363 -7
- package/src/scripts/docker-clean.js +410 -8
- package/src/scripts/dp.js +426 -7
- package/src/scripts/e.js +375 -9
- package/src/scripts/empty-trash.js +497 -7
- package/src/scripts/evm.js +428 -9
- package/src/scripts/fetch-github-repos.js +441 -10
- package/src/scripts/get-channel.js +329 -8
- package/src/scripts/get-course.js +384 -11
- package/src/scripts/get-dependencies.js +290 -9
- package/src/scripts/get-folder.js +783 -10
- package/src/scripts/get-tunes.js +411 -10
- package/src/scripts/get-video.js +352 -9
- package/src/scripts/git-backup.js +561 -9
- package/src/scripts/git-clone.js +477 -9
- package/src/scripts/git-pup.js +303 -7
- package/src/scripts/git-push.js +380 -8
- package/src/scripts/h.js +607 -9
- package/src/scripts/hide-desktop-icons.js +483 -7
- package/src/scripts/hide-hidden-files.js +522 -7
- package/src/scripts/install-dependencies-from.js +440 -9
- package/src/scripts/ips.js +647 -10
- package/src/scripts/iso.js +354 -8
- package/src/scripts/killni.js +561 -7
- package/src/scripts/ll.js +451 -8
- package/src/scripts/local-ip.js +310 -8
- package/src/scripts/m.js +508 -8
- package/src/scripts/map.js +293 -8
- package/src/scripts/mkd.js +287 -7
- package/src/scripts/ncu-update-all.js +441 -8
- package/src/scripts/nginx-init.js +702 -12
- package/src/scripts/npmi.js +366 -7
- package/src/scripts/o.js +495 -8
- package/src/scripts/org-by-date.js +321 -7
- package/src/scripts/p.js +208 -7
- package/src/scripts/packages.js +313 -8
- package/src/scripts/path.js +209 -7
- package/src/scripts/ports.js +582 -8
- package/src/scripts/q.js +290 -8
- package/src/scripts/refresh-files.js +378 -10
- package/src/scripts/remove-smaller-files.js +500 -8
- package/src/scripts/rename-files-with-date.js +517 -9
- package/src/scripts/resize-image.js +523 -9
- package/src/scripts/rm-safe.js +653 -8
- package/src/scripts/s.js +525 -9
- package/src/scripts/set-git-public.js +349 -7
- package/src/scripts/show-desktop-icons.js +459 -7
- package/src/scripts/show-hidden-files.js +456 -7
- package/src/scripts/tpa.js +265 -8
- package/src/scripts/tpo.js +264 -7
- package/src/scripts/u.js +489 -7
- package/src/scripts/vpush.js +422 -8
- package/src/scripts/y.js +267 -7
- package/src/utils/common/os.js +94 -2
- package/src/utils/ubuntu/apt.js +13 -7
- package/src/utils/windows/choco.js +82 -26
- package/src/utils/windows/winget.js +89 -27
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
# Installing yum-utils
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
yum-utils is a collection of utilities and plugins that extend and supplement the YUM (Yellowdog Updater Modified) package manager on Red Hat-based Linux distributions. It provides essential tools for repository management, package debugging, and system administration tasks.
|
|
6
|
+
|
|
7
|
+
**Key utilities included in yum-utils:**
|
|
8
|
+
|
|
9
|
+
| Utility | Description |
|
|
10
|
+
|---------|-------------|
|
|
11
|
+
| `yum-config-manager` | Manage yum repository configuration and enable/disable repos |
|
|
12
|
+
| `repoquery` | Query yum repositories for package information |
|
|
13
|
+
| `yumdownloader` | Download RPM packages without installing them |
|
|
14
|
+
| `package-cleanup` | Clean up duplicate, orphaned, or old packages |
|
|
15
|
+
| `needs-restarting` | Report processes that need restarting after updates |
|
|
16
|
+
| `yum-builddep` | Install build dependencies for source RPMs |
|
|
17
|
+
| `reposync` | Synchronize a remote yum repository to a local directory |
|
|
18
|
+
| `yum-complete-transaction` | Complete interrupted yum transactions |
|
|
19
|
+
| `debuginfo-install` | Install debuginfo packages for debugging |
|
|
20
|
+
| `repomanage` | Manage RPM packages in a repository directory |
|
|
21
|
+
|
|
22
|
+
**Important Note on Naming:**
|
|
23
|
+
- **RHEL 7, CentOS 7, Amazon Linux 2**: Use `yum-utils`
|
|
24
|
+
- **RHEL 8+, CentOS Stream 8+, Fedora 22+, Amazon Linux 2023**: Use `dnf-utils` (the `yum-utils` package name still works as an alias on most systems)
|
|
25
|
+
|
|
26
|
+
The yum-utils project has been deprecated upstream in favor of DNF's built-in functionality and dnf-utils. However, the package remains essential for systems running RHEL 7 / CentOS 7 / Amazon Linux 2 and is still available (via compatibility packages) on newer systems.
|
|
27
|
+
|
|
28
|
+
## Platform Support Summary
|
|
29
|
+
|
|
30
|
+
| Platform | Support Level | Package Manager |
|
|
31
|
+
|----------|---------------|-----------------|
|
|
32
|
+
| macOS | Not Supported | N/A |
|
|
33
|
+
| Ubuntu/Debian | Not Supported | N/A |
|
|
34
|
+
| Raspberry Pi OS | Not Supported | N/A |
|
|
35
|
+
| Amazon Linux 2 | Fully Supported | YUM |
|
|
36
|
+
| Amazon Linux 2023 | Supported (via dnf-utils) | DNF |
|
|
37
|
+
| RHEL 7 / CentOS 7 | Fully Supported | YUM |
|
|
38
|
+
| RHEL 8+ / CentOS Stream | Supported (via yum-utils/dnf-utils) | DNF |
|
|
39
|
+
| Windows | Not Supported | N/A |
|
|
40
|
+
| Git Bash | Not Supported | N/A |
|
|
41
|
+
|
|
42
|
+
**Why yum-utils is not available on some platforms:** yum-utils is specifically designed for Red Hat-based package management (RPM/YUM/DNF). Debian-based systems (Ubuntu, Raspberry Pi OS) use APT, macOS uses Homebrew, and Windows uses Chocolatey/winget. There are no equivalents or ports of yum-utils for these platforms because the underlying package management systems are fundamentally different.
|
|
43
|
+
|
|
44
|
+
## Dependencies
|
|
45
|
+
|
|
46
|
+
### Amazon Linux 2 (YUM)
|
|
47
|
+
|
|
48
|
+
- **Required:**
|
|
49
|
+
- `sudo` - Pre-installed on Amazon Linux for privilege escalation
|
|
50
|
+
- `yum` - Pre-installed package manager on Amazon Linux 2
|
|
51
|
+
- **Optional:** None
|
|
52
|
+
- **Auto-installed:** The `yum-utils` package may pull in dependencies like `python`, `yum-plugin-fastestmirror`, etc.
|
|
53
|
+
|
|
54
|
+
**Note**: All required dependencies are pre-installed on Amazon Linux 2. No additional packages need to be installed before running this installer.
|
|
55
|
+
|
|
56
|
+
### Amazon Linux 2023 (DNF)
|
|
57
|
+
|
|
58
|
+
- **Required:**
|
|
59
|
+
- `sudo` - Pre-installed on Amazon Linux for privilege escalation
|
|
60
|
+
- `dnf` - Pre-installed package manager on Amazon Linux 2023
|
|
61
|
+
- **Optional:** None
|
|
62
|
+
- **Auto-installed:** The `dnf-utils` package (which provides yum-utils functionality) may pull in Python and DNF plugin dependencies.
|
|
63
|
+
|
|
64
|
+
**Note**: All required dependencies are pre-installed on Amazon Linux 2023. No additional packages need to be installed before running this installer.
|
|
65
|
+
|
|
66
|
+
### RHEL / CentOS (DNF/YUM)
|
|
67
|
+
|
|
68
|
+
- **Required:**
|
|
69
|
+
- `sudo` - Pre-installed for privilege escalation
|
|
70
|
+
- `dnf` (RHEL 8+) OR `yum` (RHEL 7) - Pre-installed package manager
|
|
71
|
+
- **Optional:** None
|
|
72
|
+
- **Auto-installed:** Various Python and plugin dependencies
|
|
73
|
+
|
|
74
|
+
**Note**: All required dependencies are pre-installed on RHEL and CentOS systems.
|
|
75
|
+
|
|
76
|
+
## Prerequisites
|
|
77
|
+
|
|
78
|
+
Before installing yum-utils, ensure:
|
|
79
|
+
|
|
80
|
+
1. **Administrative privileges** - Root or sudo access
|
|
81
|
+
2. **Internet connectivity** - Required to download packages from repositories
|
|
82
|
+
3. **Valid repository configuration** - The base repository must be enabled and accessible
|
|
83
|
+
|
|
84
|
+
## Platform-Specific Installation
|
|
85
|
+
|
|
86
|
+
### macOS (Homebrew)
|
|
87
|
+
|
|
88
|
+
#### Not Supported
|
|
89
|
+
|
|
90
|
+
yum-utils is not available for macOS. The package is specifically designed for Red Hat-based Linux distributions that use the RPM package format and YUM/DNF package managers.
|
|
91
|
+
|
|
92
|
+
**Why it is not supported:** macOS uses a completely different package management system. Homebrew is the de facto package manager for macOS and uses its own formula-based approach rather than RPM packages.
|
|
93
|
+
|
|
94
|
+
**Alternative approaches:** If you need to manage RPM-based systems from macOS, consider:
|
|
95
|
+
|
|
96
|
+
1. **SSH into the target system** - Connect to your Amazon Linux/RHEL server directly and run yum-utils commands there
|
|
97
|
+
2. **Use Docker** - Run an Amazon Linux or CentOS container on macOS for testing
|
|
98
|
+
3. **Use Vagrant** - Create a virtual machine running Amazon Linux or CentOS
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Example: Run Amazon Linux 2023 container on macOS
|
|
102
|
+
docker run -it --rm amazonlinux:2023 /bin/bash
|
|
103
|
+
|
|
104
|
+
# Inside the container, install and use yum-utils
|
|
105
|
+
dnf install -y dnf-utils
|
|
106
|
+
yum-config-manager --help
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Ubuntu/Debian (APT)
|
|
112
|
+
|
|
113
|
+
#### Not Supported
|
|
114
|
+
|
|
115
|
+
yum-utils is not available for Ubuntu or Debian. These distributions use APT (Advanced Package Tool) with DEB packages, not YUM/DNF with RPM packages.
|
|
116
|
+
|
|
117
|
+
**Why it is not supported:** Ubuntu and Debian are based on a completely different package management architecture. While a `yum-utils` package exists in some Debian/Ubuntu repositories for creating YUM repositories, it does not provide the same functionality and is known to have issues (segfaults, no configured repositories).
|
|
118
|
+
|
|
119
|
+
**Alternative approaches:** Ubuntu/Debian have native equivalents for yum-utils functionality:
|
|
120
|
+
|
|
121
|
+
| yum-utils Tool | APT/Debian Equivalent |
|
|
122
|
+
|----------------|----------------------|
|
|
123
|
+
| `yum-config-manager` | Edit `/etc/apt/sources.list` or use `add-apt-repository` |
|
|
124
|
+
| `repoquery` | `apt-cache show`, `apt-cache depends`, `dpkg -L` |
|
|
125
|
+
| `yumdownloader` | `apt-get download` |
|
|
126
|
+
| `package-cleanup` | `apt-get autoremove`, `apt-get autoclean` |
|
|
127
|
+
| `needs-restarting` | `needrestart` package |
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Example: Download a package without installing (Ubuntu equivalent of yumdownloader)
|
|
131
|
+
apt-get download nginx
|
|
132
|
+
|
|
133
|
+
# Example: Check package dependencies (Ubuntu equivalent of repoquery --requires)
|
|
134
|
+
apt-cache depends nginx
|
|
135
|
+
|
|
136
|
+
# Example: Clean up orphaned packages (Ubuntu equivalent of package-cleanup)
|
|
137
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### Raspberry Pi OS (APT)
|
|
143
|
+
|
|
144
|
+
#### Not Supported
|
|
145
|
+
|
|
146
|
+
yum-utils is not available for Raspberry Pi OS. Like Ubuntu, Raspberry Pi OS is Debian-based and uses APT with DEB packages.
|
|
147
|
+
|
|
148
|
+
**Why it is not supported:** Raspberry Pi OS uses the same APT-based package management as Debian and Ubuntu. YUM/DNF and RPM packages are not part of the Raspberry Pi ecosystem.
|
|
149
|
+
|
|
150
|
+
**Alternative approaches:** Use the same APT equivalents described in the Ubuntu/Debian section above.
|
|
151
|
+
|
|
152
|
+
If you need to run yum-utils on Raspberry Pi hardware, you would need to install a Red Hat-based operating system. CentOS previously offered ARM builds, but these are no longer maintained. Consider:
|
|
153
|
+
|
|
154
|
+
1. **Use Docker on Raspberry Pi** - Run an Amazon Linux 2023 ARM container (if available for ARM64)
|
|
155
|
+
2. **Use the APT equivalents** - Most functionality has native APT counterparts
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### Amazon Linux (DNF/YUM)
|
|
160
|
+
|
|
161
|
+
#### Prerequisites
|
|
162
|
+
|
|
163
|
+
- Amazon Linux 2023 (AL2023) or Amazon Linux 2 (AL2)
|
|
164
|
+
- sudo privileges
|
|
165
|
+
- Internet connectivity to Amazon Linux repositories
|
|
166
|
+
|
|
167
|
+
This is the primary use case for yum-utils. Amazon Linux is a Red Hat-based distribution that fully supports yum-utils.
|
|
168
|
+
|
|
169
|
+
#### Installation Steps
|
|
170
|
+
|
|
171
|
+
**For Amazon Linux 2023:**
|
|
172
|
+
|
|
173
|
+
Amazon Linux 2023 uses DNF as its package manager. Install `dnf-utils`, which provides the same functionality as yum-utils:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
sudo dnf install -y dnf-utils
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Note:** On AL2023, `yum` is an alias for `dnf`, so `yum` commands still work. However, using `dnf` is recommended for forward compatibility.
|
|
180
|
+
|
|
181
|
+
**For Amazon Linux 2:**
|
|
182
|
+
|
|
183
|
+
Amazon Linux 2 uses YUM as its package manager:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
sudo yum install -y yum-utils
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Why the `-y` flag:** The `-y` flag automatically confirms the installation, making the command non-interactive and suitable for automation scripts and CI/CD pipelines.
|
|
190
|
+
|
|
191
|
+
#### Verification
|
|
192
|
+
|
|
193
|
+
Confirm the installation succeeded by checking for key utilities:
|
|
194
|
+
|
|
195
|
+
**For Amazon Linux 2023:**
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Check that yum-config-manager is available
|
|
199
|
+
yum-config-manager --help
|
|
200
|
+
|
|
201
|
+
# Check that repoquery is available
|
|
202
|
+
repoquery --version
|
|
203
|
+
|
|
204
|
+
# List all files installed by dnf-utils
|
|
205
|
+
rpm -ql dnf-utils
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**For Amazon Linux 2:**
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Check that yum-config-manager is available
|
|
212
|
+
yum-config-manager --help
|
|
213
|
+
|
|
214
|
+
# Check that repoquery is available
|
|
215
|
+
repoquery --version
|
|
216
|
+
|
|
217
|
+
# List all files installed by yum-utils
|
|
218
|
+
rpm -ql yum-utils
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Expected output for `yum-config-manager --help`:
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
usage: yum-config-manager [-h] [--save] [--setopt SETOPTS]
|
|
225
|
+
[--add-repo ADDREPO] [--dump-variables]
|
|
226
|
+
[--enable | --disable] [--version] [--installroot INSTALLROOT]
|
|
227
|
+
...
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### Troubleshooting
|
|
231
|
+
|
|
232
|
+
**Problem**: `No package yum-utils available` (on AL2023)
|
|
233
|
+
|
|
234
|
+
**Solution**: On Amazon Linux 2023, use `dnf-utils` instead:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
sudo dnf install -y dnf-utils
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The `yum-utils` package name may not be available as an alias on all AL2023 versions.
|
|
241
|
+
|
|
242
|
+
**Problem**: `Cannot find a valid baseurl for repo`
|
|
243
|
+
|
|
244
|
+
**Solution**: Check your network connectivity and ensure the Amazon Linux repositories are accessible:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# Test connectivity to Amazon Linux repos
|
|
248
|
+
curl -I https://cdn.amazonlinux.com/
|
|
249
|
+
|
|
250
|
+
# Update repository metadata
|
|
251
|
+
sudo dnf makecache # AL2023
|
|
252
|
+
sudo yum makecache # AL2
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Problem**: `yum-config-manager: command not found` after installation
|
|
256
|
+
|
|
257
|
+
**Solution**: The package may have installed but the shell does not see the new commands. Verify installation and refresh your PATH:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Verify package is installed
|
|
261
|
+
rpm -q yum-utils dnf-utils
|
|
262
|
+
|
|
263
|
+
# The commands are in /usr/bin which should be in PATH
|
|
264
|
+
which yum-config-manager
|
|
265
|
+
|
|
266
|
+
# If not found, check the package file list
|
|
267
|
+
rpm -ql yum-utils 2>/dev/null || rpm -ql dnf-utils
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Problem**: Permissions error when running yum-utils commands
|
|
271
|
+
|
|
272
|
+
**Solution**: Most yum-utils commands that modify system configuration require root privileges:
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Use sudo for commands that modify the system
|
|
276
|
+
sudo yum-config-manager --add-repo https://example.com/repo
|
|
277
|
+
|
|
278
|
+
# Some read-only commands work without sudo
|
|
279
|
+
repoquery --list httpd
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
### RHEL / CentOS (DNF/YUM)
|
|
285
|
+
|
|
286
|
+
#### Prerequisites
|
|
287
|
+
|
|
288
|
+
- RHEL 7/8/9, CentOS 7, CentOS Stream 8/9, Rocky Linux, or AlmaLinux
|
|
289
|
+
- sudo privileges
|
|
290
|
+
- Internet connectivity to package repositories (or configured local repositories)
|
|
291
|
+
|
|
292
|
+
#### Installation Steps
|
|
293
|
+
|
|
294
|
+
**For RHEL 8+, CentOS Stream 8+, Rocky Linux, AlmaLinux:**
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
sudo dnf install -y yum-utils
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Note: On these systems, `yum-utils` is a compatibility package that pulls in `dnf-utils`. Either package name works.
|
|
301
|
+
|
|
302
|
+
**For RHEL 7 / CentOS 7:**
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
sudo yum install -y yum-utils
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### Verification
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
# Check yum-config-manager
|
|
312
|
+
yum-config-manager --help
|
|
313
|
+
|
|
314
|
+
# Check repoquery
|
|
315
|
+
repoquery --version
|
|
316
|
+
|
|
317
|
+
# Check package-cleanup
|
|
318
|
+
package-cleanup --help
|
|
319
|
+
|
|
320
|
+
# List installed package contents
|
|
321
|
+
rpm -ql yum-utils 2>/dev/null || rpm -ql dnf-utils
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
#### Troubleshooting
|
|
325
|
+
|
|
326
|
+
**Problem**: On RHEL 8/9, `yum-utils` shows as deprecated
|
|
327
|
+
|
|
328
|
+
**Solution**: This is expected. The functionality has been integrated into DNF and dnf-utils. The commands still work:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
# These commands work the same way
|
|
332
|
+
yum-config-manager --enable some-repo
|
|
333
|
+
dnf config-manager --enable some-repo # DNF equivalent
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Problem**: `repoquery` gives different output on RHEL 8+ vs RHEL 7
|
|
337
|
+
|
|
338
|
+
**Solution**: On RHEL 8+, `repoquery` is actually `dnf repoquery` which has slightly different options. Check the help:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
repoquery --help
|
|
342
|
+
# or
|
|
343
|
+
dnf repoquery --help
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
### Windows (Chocolatey/winget)
|
|
349
|
+
|
|
350
|
+
#### Not Supported
|
|
351
|
+
|
|
352
|
+
yum-utils is not available for Windows. It is a Linux-specific tool for managing RPM packages and YUM/DNF repositories.
|
|
353
|
+
|
|
354
|
+
**Why it is not supported:** Windows uses completely different package management systems (Chocolatey, winget, or MSI installers). There is no concept of RPM packages or YUM repositories on Windows.
|
|
355
|
+
|
|
356
|
+
**Alternative approaches:**
|
|
357
|
+
|
|
358
|
+
1. **Use WSL (Windows Subsystem for Linux)** - Install Amazon Linux 2 or a RHEL-compatible distribution in WSL, then install yum-utils there
|
|
359
|
+
|
|
360
|
+
2. **Use Docker Desktop for Windows** - Run an Amazon Linux container:
|
|
361
|
+
|
|
362
|
+
```powershell
|
|
363
|
+
# Run Amazon Linux 2023 container
|
|
364
|
+
docker run -it --rm amazonlinux:2023 /bin/bash
|
|
365
|
+
|
|
366
|
+
# Inside the container
|
|
367
|
+
dnf install -y dnf-utils
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
3. **Use a virtual machine** - Install Amazon Linux or CentOS in VirtualBox, VMware, or Hyper-V
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
### WSL (Windows Subsystem for Linux)
|
|
375
|
+
|
|
376
|
+
#### Prerequisites
|
|
377
|
+
|
|
378
|
+
- Windows 10 version 2004 or later, or Windows 11
|
|
379
|
+
- WSL 2 enabled
|
|
380
|
+
- A Red Hat-based distribution installed in WSL (not Ubuntu)
|
|
381
|
+
|
|
382
|
+
**Important:** The default WSL distribution is Ubuntu, which does not support yum-utils. You need to install a Red Hat-based distribution.
|
|
383
|
+
|
|
384
|
+
#### Installation Steps
|
|
385
|
+
|
|
386
|
+
WSL does not officially support Amazon Linux or RHEL. However, you can import a Red Hat-based distribution or use Docker within WSL.
|
|
387
|
+
|
|
388
|
+
**Option 1: Use Docker within WSL Ubuntu**
|
|
389
|
+
|
|
390
|
+
This is the recommended approach. Install Docker in WSL Ubuntu and run an Amazon Linux container:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
# First, ensure Docker is installed in WSL
|
|
394
|
+
# Then run Amazon Linux container
|
|
395
|
+
docker run -it --rm amazonlinux:2023 /bin/bash
|
|
396
|
+
|
|
397
|
+
# Inside the container, install dnf-utils
|
|
398
|
+
dnf install -y dnf-utils
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**Option 2: Import an OracleLinux or similar distro**
|
|
402
|
+
|
|
403
|
+
OracleLinux (which is RHEL-compatible) can be imported into WSL:
|
|
404
|
+
|
|
405
|
+
```powershell
|
|
406
|
+
# In PowerShell, download and import OracleLinux
|
|
407
|
+
# (Check Oracle's documentation for current WSL images)
|
|
408
|
+
wsl --import OracleLinux C:\WSL\OracleLinux .\OracleLinux.tar
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
After importing a RHEL-compatible distro, install yum-utils:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
# For Oracle Linux 8+ / RHEL 8+
|
|
415
|
+
sudo dnf install -y yum-utils
|
|
416
|
+
|
|
417
|
+
# For Oracle Linux 7 / CentOS 7
|
|
418
|
+
sudo yum install -y yum-utils
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
#### Verification
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
# Verify installation
|
|
425
|
+
yum-config-manager --help
|
|
426
|
+
repoquery --version
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
#### Troubleshooting
|
|
430
|
+
|
|
431
|
+
**Problem**: Running yum-utils commands in WSL Ubuntu gives "command not found"
|
|
432
|
+
|
|
433
|
+
**Solution**: WSL Ubuntu is Debian-based and does not support yum-utils. Use Docker or import a RHEL-based distribution as described above.
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### Git Bash (Manual/Portable)
|
|
438
|
+
|
|
439
|
+
#### Not Supported
|
|
440
|
+
|
|
441
|
+
yum-utils is not available for Git Bash. Git Bash is a terminal emulator for Windows that provides a Unix-like command-line experience, but it does not include Linux package management systems.
|
|
442
|
+
|
|
443
|
+
**Why it is not supported:** Git Bash runs on Windows and does not have access to YUM, DNF, or RPM infrastructure. The yum-utils package requires a full Linux environment with RPM database support.
|
|
444
|
+
|
|
445
|
+
**Alternative approaches:**
|
|
446
|
+
|
|
447
|
+
1. **Use Docker from Git Bash** - If Docker Desktop is installed:
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
# From Git Bash, run Amazon Linux container
|
|
451
|
+
docker run -it --rm amazonlinux:2023 /bin/bash
|
|
452
|
+
|
|
453
|
+
# Inside the container
|
|
454
|
+
dnf install -y dnf-utils
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
2. **SSH to a Linux server** - Connect to an Amazon Linux or RHEL server:
|
|
458
|
+
|
|
459
|
+
```bash
|
|
460
|
+
# From Git Bash
|
|
461
|
+
ssh user@your-amazon-linux-server
|
|
462
|
+
|
|
463
|
+
# On the remote server
|
|
464
|
+
sudo dnf install -y dnf-utils
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
## Post-Installation Configuration
|
|
470
|
+
|
|
471
|
+
### Adding Third-Party Repositories
|
|
472
|
+
|
|
473
|
+
One of the most common uses of yum-utils is adding third-party repositories. Here is how to add a repository using `yum-config-manager`:
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
# Add a repository from a URL
|
|
477
|
+
sudo yum-config-manager --add-repo https://example.com/repo/example.repo
|
|
478
|
+
|
|
479
|
+
# Example: Add the Docker CE repository on Amazon Linux 2
|
|
480
|
+
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
|
481
|
+
|
|
482
|
+
# Example: Add the HashiCorp repository for Terraform
|
|
483
|
+
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Enabling and Disabling Repositories
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
# List all repositories
|
|
490
|
+
yum repolist all
|
|
491
|
+
|
|
492
|
+
# Enable a disabled repository
|
|
493
|
+
sudo yum-config-manager --enable epel
|
|
494
|
+
|
|
495
|
+
# Disable a repository
|
|
496
|
+
sudo yum-config-manager --disable epel-testing
|
|
497
|
+
|
|
498
|
+
# Enable a repository for a single transaction
|
|
499
|
+
sudo dnf install --enablerepo=epel-testing some-package -y
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### Downloading Packages Without Installing
|
|
503
|
+
|
|
504
|
+
Use `yumdownloader` to download RPM packages for offline installation or inspection:
|
|
505
|
+
|
|
506
|
+
```bash
|
|
507
|
+
# Download a package to the current directory
|
|
508
|
+
yumdownloader httpd
|
|
509
|
+
|
|
510
|
+
# Download a package and its dependencies
|
|
511
|
+
yumdownloader --resolve httpd
|
|
512
|
+
|
|
513
|
+
# Download to a specific directory
|
|
514
|
+
yumdownloader --destdir=/tmp/packages httpd
|
|
515
|
+
|
|
516
|
+
# Download source RPMs
|
|
517
|
+
yumdownloader --source httpd
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Querying Repository Information
|
|
521
|
+
|
|
522
|
+
Use `repoquery` to get detailed package information:
|
|
523
|
+
|
|
524
|
+
```bash
|
|
525
|
+
# List all packages in a repository
|
|
526
|
+
repoquery --repoid=amzn2-core '*'
|
|
527
|
+
|
|
528
|
+
# Show package dependencies
|
|
529
|
+
repoquery --requires httpd
|
|
530
|
+
|
|
531
|
+
# Show what packages depend on a package
|
|
532
|
+
repoquery --whatrequires openssl
|
|
533
|
+
|
|
534
|
+
# List files in a package (not installed)
|
|
535
|
+
repoquery --list httpd
|
|
536
|
+
|
|
537
|
+
# Show package information
|
|
538
|
+
repoquery --info httpd
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
### Cleaning Up Old Packages
|
|
542
|
+
|
|
543
|
+
Use `package-cleanup` to maintain system cleanliness:
|
|
544
|
+
|
|
545
|
+
```bash
|
|
546
|
+
# Remove orphaned packages (packages not in any repository)
|
|
547
|
+
sudo package-cleanup --orphans
|
|
548
|
+
|
|
549
|
+
# Remove old kernels (keep only the 2 most recent)
|
|
550
|
+
sudo package-cleanup --oldkernels --count=2
|
|
551
|
+
|
|
552
|
+
# Find duplicate packages
|
|
553
|
+
package-cleanup --dupes
|
|
554
|
+
|
|
555
|
+
# Find packages with dependency problems
|
|
556
|
+
package-cleanup --problems
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
## Common Issues
|
|
562
|
+
|
|
563
|
+
### Issue: Commands Work Differently on DNF vs YUM Systems
|
|
564
|
+
|
|
565
|
+
**Symptoms:** Same command gives different output or options on RHEL 7 vs RHEL 8+.
|
|
566
|
+
|
|
567
|
+
**Solution:** On RHEL 8+ / Amazon Linux 2023, yum-utils commands are actually DNF commands. Check documentation for any differences:
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
# On RHEL 8+ / AL2023, these are equivalent:
|
|
571
|
+
yum-config-manager --help
|
|
572
|
+
dnf config-manager --help
|
|
573
|
+
|
|
574
|
+
# repoquery on RHEL 8+ is actually:
|
|
575
|
+
dnf repoquery --help
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### Issue: "yum-config-manager: command not found" After System Update
|
|
579
|
+
|
|
580
|
+
**Symptoms:** After a system update, yum-config-manager stops working.
|
|
581
|
+
|
|
582
|
+
**Solution:** The package may have been removed during updates. Reinstall:
|
|
583
|
+
|
|
584
|
+
```bash
|
|
585
|
+
# Amazon Linux 2023 / RHEL 8+
|
|
586
|
+
sudo dnf install -y dnf-utils
|
|
587
|
+
|
|
588
|
+
# Amazon Linux 2 / RHEL 7
|
|
589
|
+
sudo yum install -y yum-utils
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
### Issue: Repository URL Returns 404
|
|
593
|
+
|
|
594
|
+
**Symptoms:** `yum-config-manager --add-repo` succeeds but packages cannot be found.
|
|
595
|
+
|
|
596
|
+
**Solution:** Verify the repository URL is correct and accessible:
|
|
597
|
+
|
|
598
|
+
```bash
|
|
599
|
+
# Test the repository URL
|
|
600
|
+
curl -I https://example.com/repo/repodata/repomd.xml
|
|
601
|
+
|
|
602
|
+
# If 404, the URL may be incorrect or the repo may have moved
|
|
603
|
+
# Remove the bad repo file
|
|
604
|
+
sudo rm /etc/yum.repos.d/example.repo
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
### Issue: GPG Key Errors When Installing from Third-Party Repo
|
|
608
|
+
|
|
609
|
+
**Symptoms:** "GPG key retrieval failed" or "Public key not installed"
|
|
610
|
+
|
|
611
|
+
**Solution:** Import the GPG key or disable GPG checking (not recommended for production):
|
|
612
|
+
|
|
613
|
+
```bash
|
|
614
|
+
# Import the repository GPG key
|
|
615
|
+
sudo rpm --import https://example.com/repo/RPM-GPG-KEY-example
|
|
616
|
+
|
|
617
|
+
# Or temporarily disable GPG check (use with caution)
|
|
618
|
+
sudo dnf install --nogpgcheck some-package -y
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### Issue: Slow Repository Operations
|
|
622
|
+
|
|
623
|
+
**Symptoms:** yumdownloader, repoquery, or reposync commands are very slow.
|
|
624
|
+
|
|
625
|
+
**Solution:** Update repository metadata cache:
|
|
626
|
+
|
|
627
|
+
```bash
|
|
628
|
+
# Refresh metadata cache
|
|
629
|
+
sudo dnf makecache # AL2023 / RHEL 8+
|
|
630
|
+
sudo yum makecache # AL2 / RHEL 7
|
|
631
|
+
|
|
632
|
+
# Use fastest mirror plugin (if available)
|
|
633
|
+
sudo dnf install -y dnf-plugins-core
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
---
|
|
637
|
+
|
|
638
|
+
## References
|
|
639
|
+
|
|
640
|
+
- [yum-utils Linux Manual Page](https://man7.org/linux/man-pages/man1/yum-utils.1.html)
|
|
641
|
+
- [GitHub - yum-utils (Deprecated)](https://github.com/rpm-software-management/yum-utils)
|
|
642
|
+
- [Amazon Linux 2023 Package Management](https://docs.aws.amazon.com/linux/al2023/ug/package-management.html)
|
|
643
|
+
- [Amazon Linux 2 Package Management](https://docs.aws.amazon.com/linux/al2/ug/find-install-software.html)
|
|
644
|
+
- [Red Hat - Managing Software with DNF](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/managing_software_with_the_dnf_tool/index)
|
|
645
|
+
- [DNF vs YUM Comparison](https://phoenixnap.com/kb/dnf-vs-yum)
|
|
646
|
+
- [Fedora - Yum to DNF Cheatsheet](https://fedoraproject.org/wiki/Yum_to_DNF_Cheatsheet)
|
|
647
|
+
- [TecMint - yum-utils Guide](https://www.tecmint.com/linux-yum-package-management-with-yum-utils/)
|
|
648
|
+
- [pkgs.org - dnf-utils Package](https://pkgs.org/download/dnf-utils)
|