{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/26094","labels_url":"https://api.github.com/repos/saltstack/salt/issues/26094/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/26094/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/26094/events","html_url":"https://github.com/saltstack/salt/issues/26094","id":99633835,"number":26094,"title":"salt.states.pkgrepo.managed does not clean repository file if name is changed","user":{"login":"Doctor-love","id":2008673,"avatar_url":"https://avatars.githubusercontent.com/u/2008673?v=3","gravatar_id":"","url":"https://api.github.com/users/Doctor-love","html_url":"https://github.com/Doctor-love","followers_url":"https://api.github.com/users/Doctor-love/followers","following_url":"https://api.github.com/users/Doctor-love/following{/other_user}","gists_url":"https://api.github.com/users/Doctor-love/gists{/gist_id}","starred_url":"https://api.github.com/users/Doctor-love/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doctor-love/subscriptions","organizations_url":"https://api.github.com/users/Doctor-love/orgs","repos_url":"https://api.github.com/users/Doctor-love/repos","events_url":"https://api.github.com/users/Doctor-love/events{/privacy}","received_events_url":"https://api.github.com/users/Doctor-love/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-07T11:48:25Z","updated_at":"2015-08-07T11:48:25Z","closed_at":null,"body":"If pkgrepo.managed is used to manage a APT repository and the name (URL) is changed, Salt appends the new name to the repository file but does not remove the original name.\r\n\r\n```\r\nmaster # salt --versions-report \r\n                  Salt: 2015.5.3\r\n                Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n                Jinja2: 2.7.2\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.3.0\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6.1\r\n               libnacl: Not Installed\r\n                PyYAML: 3.10\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 14.0.1\r\n                  RAET: Not Installed\r\n                   ZMQ: 4.0.4\r\n                  Mako: 0.9.1\r\n               Tornado: Not Installed\r\n Debian source package: 2015.5.3+ds-1trusty1\r\n```\r\n```\r\nminion # salt-minion --versions-report\r\n                  Salt: 2015.5.2\r\n                Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n                Jinja2: 2.7.2\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.3.0\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6.1\r\n               libnacl: Not Installed\r\n                PyYAML: 3.10\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 14.0.1\r\n                  RAET: Not Installed\r\n                   ZMQ: 4.0.4\r\n                  Mako: 0.9.1\r\n Debian source package: 2015.5.2+ds-1trusty1\r\n```"}}