{"id":127,"date":"2014-10-13T14:48:11","date_gmt":"2014-10-13T21:48:11","guid":{"rendered":"http:\/\/www.steveneppler.com\/blog\/?p=127"},"modified":"2014-12-14T11:40:20","modified_gmt":"2014-12-14T18:40:20","slug":"remove-a-printer-installed-by-profile-manager-or-mcx-from-the-command-line-or-remote-ard-command","status":"publish","type":"post","link":"https:\/\/steveneppler.com\/blog\/2014\/10\/13\/remove-a-printer-installed-by-profile-manager-or-mcx-from-the-command-line-or-remote-ard-command","title":{"rendered":"Remove a printer installed by Profile Manager or MCX from the command line (or remote ARD command)"},"content":{"rendered":"<p>When Profile Manager installs a printer, the CUPS queue name doesn&#8217;t match what the user sees.  You can get a list of those queues by typing <code>lpstat -s<\/code>.  To remove the printer by the name you define in Profile Manager with a script, you&#8217;ll need to find out the CUPS name.<\/p>\n<p>Here&#8217;s a one-liner to remove a printer that was automatically installed with Profile Manager:<\/p>\n<p><code><br \/>\nexport ptr=\"PRINTERNAME\";lpstat -s | awk \"\\$4 ~ \/$ptr\/ {print \\$3}\" | tr -d : | xargs lpadmin -x<br \/>\n<\/code><\/p>\n<p>Just replace PRINTERNAME with the correct queue name.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When Profile Manager installs a printer, the CUPS queue name doesn&#8217;t match what the user sees. You can get a list of those queues by typing lpstat -s. To remove the printer by the name you define in Profile Manager with a script, you&#8217;ll need to find out the CUPS name. Here&#8217;s a one-liner to &#8230; <a title=\"Remove a printer installed by Profile Manager or MCX from the command line (or remote ARD command)\" class=\"read-more\" href=\"https:\/\/steveneppler.com\/blog\/2014\/10\/13\/remove-a-printer-installed-by-profile-manager-or-mcx-from-the-command-line-or-remote-ard-command\" aria-label=\"Read more about Remove a printer installed by Profile Manager or MCX from the command line (or remote ARD command)\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7,4],"tags":[],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-apple","category-mac-os-x","category-on-the-job"],"_links":{"self":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":4,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":132,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions\/132"}],"wp:attachment":[{"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/steveneppler.com\/blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}