Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455121 - Deleting all packages from a beta channel ends with an exception
Summary: Deleting all packages from a beta channel ends with an exception
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Backend
Version: RHN Stable
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: rhn-dev-list
QA Contact: Red Hat Network Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-07-12 10:10 UTC by Daniel Mach
Modified: 2017-07-05 15:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2017-07-05 15:19:46 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Daniel Mach 2008-07-12 10:10:50 UTC
Description of problem:
Deleting all packages from a beta channel ends with an exception.

How reproducible:
I already tried to delete s390 channel and I succeeded after deleting some rpms.

Steps to Reproduce:
rhn-delete-package-internal --skip-errata-cache --commit --verbose --server qa
--orgid "" --channel rhel-ppc-as-4-beta --all --user rhel-admin

Actual results:
Connecting to
Red Hat Network password:
Deleting all packages from the given channel(s)

Error Message:
    ORA-00001: unique constraint (RHN.RHN_PACKAGE_N_E_PA_O_UQ) violated
Error Class Code: 23
Error Class Info: Could not update database entry.

Expected results:
empty channel

Comment 1 James Bowes 2008-07-14 19:23:53 UTC
This sounds to me like there is already a similar package in the
rhn-recycled-org org in the db (where packages go when they are "deleted"). You
should be able to get past this by first running rhn-delete-package-internal
--purge, then running the above command.

Comment 2 Daniel Mach 2008-07-14 20:47:09 UTC
Thank you James, it works.

Is it possible to get a list of these deleted files via xml-rpc?
I'd like to improve our scripts to check for deleted files first, purge them and
then delete existing files.

Is there any reason to have this constraint?
I understand why a name of existing package has to be unique,
but you can delete the same package more than once on webqa or stage...

Comment 4 Thomas "Shea" DeAntonio 2017-07-05 15:19:46 UTC
As you may already be aware, Red Hat is transitioning from the Red Hat Network (RHN) hosted interface to the Red Hat Subscription Management (RHSM) interface in July 2017. Red Hat has invested in and seen success from RHN for many years, and used that experience to build more robust technologies like RHSM. 
If you have not yet migrated your RHN systems to RHSM or you are a Red Hat Satellite customer, please review the information from. 
Since we are shutting down RHN, no further actions will be taken with this bug or enhancement request.  You can find additional information at RHSM product page (  If you have further questions, please contact support (

Note You need to log in before you can comment on or make changes to this bug.