**Try This :-**  
 <?php
    
    namespace Company\Modulename\Setup 
    
    class Uninstall implements \Magento\Framework\Setup\UninstallInterface
    {
    
        protected $eavSetupFactory;
           
        public function __construct(\Magento\Eav\Setup\EavSetupFactory $eavSetupFactory)
        {
              $this->eavSetupFactory = $eavSetupFactory;
        }
    
        public function uninstall(\Magento\Framework\Setup\SchemaSetupInterface $setup, \Magento\Framework\Setup\ModuleContextInterface $context)
        {
             $setup->startSetup();
             $eavSetup = $this->eavSetupFactory->create();       
             $entityTypeId = 1; // Attributte Id
             $eavSetup->removeAttribute($entityTypeId, 'attribute_code');
             $setup->endSetup();
        }
    }