theme is not showing in admin panel list magento2

figure out by myself. i was missing the

app/design/frontend/Magento/mytheme/composer.json

{
    "name": "magento/theme-frontend-blank",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/theme-frontend-blank": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

app/design/frontend/Magento/mytheme/registration.php

<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Magento/mytheme',
    __DIR__
);

Reference


In my case, it worked after I ran the following command from the Magento 2 root folder:

php bin/magento setup:upgrade

If it doesn't work, then you may run the command with sudo:

sudo php bin/magento setup:upgrade

Follow steps for create new theme:

step : 1 (theme.xml inside app/design/frontend/Magento/companyname)

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Magento Companyname</title>
    <parent>Magento/luma</parent>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>

Step : 2 (registration.php inside app/design/frontend/Magento/companyname)

In this file, we must use companyname in small case for defined value of our theme frontend/Magento/companyname.

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Magento/companyname',
    __DIR__
);

Step : 3 composer.json (composer.json inside app/design/frontend/Magento/companyname)

{
    "name": "magento/theme-frontend-companyname",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/theme-frontend-luma": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}