diff --git a/platypush/platydock/__init__.py b/platypush/platydock/__init__.py index a80608f5..5946252f 100755 --- a/platypush/platydock/__init__.py +++ b/platypush/platydock/__init__.py @@ -234,9 +234,8 @@ def rm(args): parser.add_argument('image', type=str, help='Platypush image to remove') opts, args = parser.parse_known_args(args) - devdir = os.path.join(workdir, Config.get('device_id')) subprocess.call(['docker', 'rmi', 'platypush-{}'.format(opts.image)]) - subprocess.call(['rm', '-r', 'platypush-{}'.format(opts.image)]) + subprocess.call(['rm', '-r', os.path.join(workdir, opts.image)]) def ls(args):