In GitHub Packages, what visibility can a package have, and what changes once you make a container image public?
answer
- three visibility levels
- the default at first publish
- a one-way door
- who can pull without logging in
basics
~10 sA GitHub Packages package is private, internal or public, and an account-scoped package starts private. Making it public cannot be undone, and a public container image can then be pulled anonymously by anyone.
solid answer
~40 sA package in GitHub Packages is **private**, **internal** or **public**. A package published to a granular registry such as the Container registry starts **private**, and a package admin changes it under *Change visibility* in the package settings. Internal packages are visible to every member of the organization, or of the enterprise when the organization belongs to one. The crucial rule is that **once a package is public it cannot be made private again**. For the Container registry, public also means **anonymous pulls**: anyone can pull the image without authenticating, whereas most other registries still require a token even for public packages. Public packages are free, and a public version that passes 5,000 downloads can no longer be deleted by its owner, so going public is a decision to think about before you click.
go deeper
Remember the three levels, that new packages start private, and that public is permanent for that package.
Explain why public container images pull anonymously while other registries still need a token, and where internal fits between private and public.
Treat a visibility change as a release decision: check layer contents, the deletion limits on public versions and who will start depending on the package.
Decide when internal visibility serves cross-team reuse better than public distribution, and how the organization's package-creation policy should constrain members.
## The three visibility levels In GitHub Packages, **visibility** decides who can see and install a package before any individual role is considered. For registries with granular permissions — Container, npm, NuGet and RubyGems — visibility is a setting of the package itself, and anyone with the package's **Admin** role can change it. Maven and Gradle packages are repository-scoped and take their permissions and visibility from the repository. | Visibility | Who can see it | |---|---| | **Private** | Only people, teams and repositories granted a role on the package | | **Internal** | Every member of the organization; every enterprise member if the organization belongs to an enterprise | | **Public** | Everyone on GitHub | When you first publish a package to a granular registry, its visibility is **private** and only you can see it until you grant access or change the setting. An organization can also restrict which visibilities members may create: under the organization's *Package Creation* setting an owner enables public, private or internal packages for members. A related limit: when an organization package is private or internal, its admin can grant roles only to members and teams of that organization. ## The one-way door The package settings place *Change visibility* in the **Danger Zone**, and the documentation warns plainly: **once you make a package public, you cannot make it private again.** There is no switch back in the settings. The practical consequences: 1. Anything in the published versions — a base image with internal tooling, a debug build, a configuration file — is readable by anyone from that moment, and copies may already exist outside your control. 2. Projects outside your organization may start depending on the package, which makes later deletion harmful to them. 3. Deleting a public package or version becomes restricted once downloads accumulate: a public version with more than 5,000 downloads cannot be deleted by its owner, and a whole public package cannot be deleted if any version passed that mark. GitHub Support is the route then. Treat the change as a release decision, reviewed like one, rather than a convenience toggle. ## What "public" means for container images Pull access is where the Container registry differs from the rest. In most GitHub Packages registries you must authenticate with a personal access token or `GITHUB_TOKEN` to pull a package, **even when it is public**. In the Container registry, public images allow **anonymous access** and can be pulled without signing in. That is why making an image public is the usual way to let anyone run it, and also why a mistakenly public image is immediately exposed to the whole internet. Public visibility also affects permissions for automation. A public package can be downloaded by a workflow in any repository; an internal one by workflows in repositories owned by the enterprise; a private one only by workflows in repositories that have been given read on the package. ## Visibility and linked repositories Linking a granular package to a repository can make it inherit the repository's **access permissions**, and the access-control guide says that inheritance does not include visibility. The guide on publishing from workflows, by contrast, describes a package created by a workflow with `GITHUB_TOKEN` as following the visibility and permissions model of the workflow's repository. The safe habit is to read the visibility on the package page after the first publish rather than infer it from the repository. ## Cost and housekeeping angles - Public packages are **free** to store and transfer; private ones count against the owner's plan allowance. - Public container images are convenient for open-source distribution, but their versions accumulate downloads quickly, which closes the deletion window. - If a team needs a package shared widely inside a company but not on the internet, **internal** visibility is the intended level, not public. ## Answers that lose points - "We can flip it back to private if it turns out to be a mistake." - "A public npm package on GitHub Packages installs without any token." - "A freshly pushed image is public until someone locks it down." - "Internal and private are the same thing."
- In GitHub Packages, a teammate made an organization's container image public by mistake. What can you actually do?You cannot set it back to private. Delete the exposed versions or the whole package while the download counts still allow it — a public version above 5,000 downloads cannot be deleted by the owner — and republish under a fresh private package if needed. Treat anything in those layers, such as embedded credentials, as already leaked.
- In GitHub Packages, how do internal packages differ from private ones?An internal package is visible to every member of the organization, or every enterprise member when the organization belongs to an enterprise, without individual grants. A private package is visible only to the people, teams and repositories given a role on it.
- A public package can be switched back to private later from its settings.
- Every public GitHub Packages registry allows anonymous installs, not just containers.
- A freshly pushed container image starts out public.
- Internal visibility means only the package's admins can see it.
- A public version can always be deleted, whatever its download count.