# RHEL Repos

### Ensure Register

Check register Status with these commands. Output might no match exactly just general checks to see if anything looks weird.

```bash
sudo subscription-manager identity
```

```bash
system identity: 3634c02b-c3ce-4533-8151-8c7cc2d13318
name: RP-Host-03
org name: 7752782
org ID: 7752782
```

And

```bash
sudo subscription-manager status
```

```bash
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Registered
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.
```

Register if not

```bash
sudo subscription-manager register --org=7752782 --activationkey=KEY_HERE
```


### Repos

Repos should be added automatically after registering. Check to ensure the correct repos are enabled.

Ensure only these repos are enabled

- rhel-8-for-x86\_64-baseos-rpms
- rhel-8-for-x86\_64-appstream-rpms

```bash
sudo subscription-manager repos --list-enabled
```

Should show

```bash
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-8-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel8/8.10/x86_64/baseos/os
Enabled:   1

Repo ID:   rhel-8-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel8/8.10/x86_64/appstream/os
Enabled:   1
```

Run updates

```bash
sudo dnf update -y
```

### Failed EUS Repositories

Redhat adds Extended Update Support (EUS) repos to the list by default. These can be disabled as they are only required for unsupported dependencies.

#### Fix for most cases

```bash
sudo subscription-manager repos \
  --disable=rhel-8-for-x86_64-baseos-eus-rpms \
  --disable=rhel-8-for-x86_64-appstream-eus-rpms
```

```bash
sudo dnf update -y
```

#### Manual Checking

Check the listed repos

```bash
sudo subscription-manager repos --list-enabled
```

Disable repos by name

```bash
sudo subscription-manager repos --disable=rhel-8-for-x86_64-baseos-eus-rpms
```

Run upgrades

```bash
sudo dnf update -y
```