Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
[ProGet] [NativeApi] NpmPackages_DeletePackage not working.
-
Hello!
I'm trying to delete a npm package from a feed via native api.await fetch(`${host}/api/json/NpmPackages_DeletePackage`, 'post', { 'Content-Type': 'application/json' }, JSON.stringify({ Feed_Name: 'npm', Package_Name: name.split('/').pop(), // `pkgname` Scope_Name: name.split('/')[0], // '@myscope` API_Key: this.token, Version_Text: pkg.Version.toString() // `2.3.4` }));And it returns
200: OKwith simple headers'content-length': '0', 'cache-control': 'private', 'x-proget-version': '5.3.24.7', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'x-frame-options': 'SAMEORIGIN', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block',But a package remains in a feed.
How can I remove a package from npm feed with api?
ProGet version 5.3.24 hosted on docker
-
Hello,
That API will only delete package metadata from the database, not from disk. It's mostly intended for internal use only, and probably shouldn't be exposed to the API. In any case, we don't store the
@with internally, so if you change@myscopetomyscopeit should work.Note that the NPM doesn't provide a way to delete packages, and we never implemented it. There hasn't been any demand for it to date, as people don't really delete packages programmatically - but you're definitely welcome to submit a feature request and help us understand why it'd be a value (like, the workflow you use that requires deleting packages, etc).
Alana
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login