- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Array Performance and Data Protection
- >
- Re: Delete all orphaned snapshots at once
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2018 01:50 AM - edited 08-10-2018 01:55 AM
08-10-2018 01:50 AM - edited 08-10-2018 01:55 AM
Re: Delete all orphaned snapshots at once
A very quick and dirty way to do this would be to run this from the command line:
snap --list --unmanaged --all |awk '{if ($4 == "No") {system(sprintf("snap --delete %s --vol %s", $2, $1))}}'
Be absolutely sure of what you are doing before running the command though and verify that the list "snap --list --unmanaged --all" is what you want to delete. There is no breaking out of it once you execute.
You can see the commands that will be run by running this:
snap --list --unmanaged --all |awk '{if ($4 == "No") {printf("snap --delete %s --vol %s\n", $2, $1)}}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2019 11:51 AM
03-29-2019 11:51 AM
Re: Delete all orphaned snapshots at once
Just in case someone wanted the powershell to do this:
- « Previous
-
- 1
- 2
- Next »