The #pragma deleteclass command is used in SMS/Configuration Manager hardware inventory modification to delete class information from WMI repositories. There are a couple of instances where this command comes in handy. If you are testing new hardware inventory modifications, and making changes to your mof edits during testing, you'll want to start off with a clean slate each time the client compiles the new mof file to avoid unforseen consequences. Or maybe you've just decided that you don't want to clutter up client WMI repositories with unnecessary class information and just want to delete it.
Note: When deleting WMI classes from clients that have already performed hardware inventories (especially if you have changed a Key field), you should also delete the class information stored in the site database as well. I won't go into that here, but Microsoft's delgrp.exe (involves going into SQL Server) and SMS Expert's SiteSweeper (easy way) can be used for that.
To delete the unneeded classes from a client's local system WMI repository, you need to manually compile a modified MOF (SMS_def.mof or 'mini-mof' for SMS 2003) or add the lines to the Configuration.mof (Configuration Manager) containing the now famous #pragma deleteclass line. Just open up your MOF/'mini-mof' and comment out the entire section for your targeted class-or delete the class totally and roll the dice that you'll never need it again. Make sure you use the #pragma deleteclass command on both the data and reporting classes as in the example below:
#pragma namespace("\\\\.\\root\\CIMV2")
#pragma deleteclass("ClassIDontLikeAnymore",NOFAIL)
#pragma namespace("\\\\.\\ROOT\\CIMV2\\SMS")
#pragma deleteclass("ClassIDontLikeAnymore",NOFAIL)
/*
...ClassIDontLikeAnymore information that I used to like, but now I don't. I've commented
it out in case I ever make friends with ClassIDontLikeAnymore again...
*/
P.S. Do not delete a data class unless you created it!