{"id":2861,"date":"2025-07-07T12:57:55","date_gmt":"2025-07-07T12:57:55","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=2861"},"modified":"2025-07-07T12:58:05","modified_gmt":"2025-07-07T12:58:05","slug":"how-to-remove-delete-an-email-account-via-cpanel-cli-uapi","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/","title":{"rendered":"How to remove\/delete an Email Account via cPanel CLI (UAPI)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction:<\/h3>\n\n\n\n<p>In cPanel, email accounts are usually managed through the web interface. However, if you&#8217;re comfortable with the command line or managing multiple accounts, using the cPanel CLI with UAPI is a faster and more efficient method. This guide explains how to remove an email account directly from the terminal using a simple UAPI command.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Prerequisites:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SSH access to the server with root privileges.<\/li>\n\n\n\n<li>cPanel account and domain are active and properly configure.<\/li>\n<\/ul>\n\n\n\n<p><strong>Step1:<\/strong><\/p>\n\n\n\n<p>Log in as root or a privileged user:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>$ ssh root@server-ip-address<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Step 2:<\/strong><\/p>\n\n\n\n<p>Identify the cPanel Username<\/p>\n\n\n\n<p>$ grep \u2018DOMAIN\u2019 \/var\/cpanel\/users\/*<\/p>\n\n\n\n<p>Replace &#8216;DOMAIN&#8217; with the actual domain. It will show the cPanel user.<\/p>\n\n\n\n<p><strong>Step 3:<\/strong><\/p>\n\n\n\n<p>List Email Accounts<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>$uapi &#8211;user=example Email list_pops<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Step 4:<\/strong><\/p>\n\n\n\n<p>To remove the email account <code>support@example.com<\/code>, and the cPanel username is <code>example<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>$uapi &#8211;user=example Email delete_pop email=support@example.com<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Output for example:<\/h4>\n\n\n\n<p>A successful command execution might return output like<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">metadata:<br>      result: 1<br>      version: 1<br>      command: delete_pop<br>      reason: OK<br>      status: 1<br>data: {}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Conclusion:<\/h4>\n\n\n\n<p>Using the cPanel UAPI via CLI is a fast and efficient way to manage email accounts on a server. Whether cleaning up unused addresses or automating workflows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In cPanel, email accounts are usually managed through the web interface. However, if you&#8217;re comfortable with the command line or managing multiple accounts, using the cPanel CLI with UAPI is a faster and more efficient method. This guide explains how to remove an email account directly from the terminal using a simple UAPI command. ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33],"tags":[5,204,205,8],"class_list":["post-2861","post","type-post","status-publish","format-standard","hentry","category-whm","tag-cpanel","tag-email","tag-uapi","tag-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to remove\/delete an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to remove\/delete an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction: In cPanel, email accounts are usually managed through the web interface. However, if you&#8217;re comfortable with the command line or managing multiple accounts, using the cPanel CLI with UAPI is a faster and more efficient method. This guide explains how to remove an email account directly from the terminal using a simple UAPI command. ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-07T12:57:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-07T12:58:05+00:00\" \/>\n<meta name=\"author\" content=\"Saikrishna Areddy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Saikrishna Areddy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/\"},\"author\":{\"name\":\"Saikrishna Areddy\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\"},\"headline\":\"How to remove\\\/delete an Email Account via cPanel CLI (UAPI)\",\"datePublished\":\"2025-07-07T12:57:55+00:00\",\"dateModified\":\"2025-07-07T12:58:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/\"},\"wordCount\":199,\"commentCount\":0,\"keywords\":[\"cPanel\",\"Email\",\"UAPI\",\"WHM\"],\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/\",\"name\":\"How to remove\\\/delete an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2025-07-07T12:57:55+00:00\",\"dateModified\":\"2025-07-07T12:58:05+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2025\\\/07\\\/07\\\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to remove\\\/delete an Email Account via cPanel CLI (UAPI)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/8a5f4b5a8e71659e5a3bbee27663d9ba\",\"name\":\"Saikrishna Areddy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g\",\"caption\":\"Saikrishna Areddy\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/saikrishna\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to remove\/delete an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/","og_locale":"en_US","og_type":"article","og_title":"How to remove\/delete an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base","og_description":"Introduction: In cPanel, email accounts are usually managed through the web interface. However, if you&#8217;re comfortable with the command line or managing multiple accounts, using the cPanel CLI with UAPI is a faster and more efficient method. This guide explains how to remove an email account directly from the terminal using a simple UAPI command. ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2025-07-07T12:57:55+00:00","article_modified_time":"2025-07-07T12:58:05+00:00","author":"Saikrishna Areddy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Saikrishna Areddy","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/"},"author":{"name":"Saikrishna Areddy","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba"},"headline":"How to remove\/delete an Email Account via cPanel CLI (UAPI)","datePublished":"2025-07-07T12:57:55+00:00","dateModified":"2025-07-07T12:58:05+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/"},"wordCount":199,"commentCount":0,"keywords":["cPanel","Email","UAPI","WHM"],"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/","name":"How to remove\/delete an Email Account via cPanel CLI (UAPI) - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2025-07-07T12:57:55+00:00","dateModified":"2025-07-07T12:58:05+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2025\/07\/07\/how-to-remove-delete-an-email-account-via-cpanel-cli-uapi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to remove\/delete an Email Account via cPanel CLI (UAPI)"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/8a5f4b5a8e71659e5a3bbee27663d9ba","name":"Saikrishna Areddy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/219fb50fa61a168b58a5e704d05058f958504aa8324675172185e3f0e8b3fd24?s=96&d=mm&r=g","caption":"Saikrishna Areddy"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/saikrishna\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=2861"}],"version-history":[{"count":3,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2861\/revisions"}],"predecessor-version":[{"id":2869,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2861\/revisions\/2869"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=2861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=2861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=2861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}